Skip to content

[Speech Engine] Add full response to Speech Engine API calls#793

Merged
PaulAsjes merged 3 commits into
mainfrom
pma/add-seng-details
May 21, 2026
Merged

[Speech Engine] Add full response to Speech Engine API calls#793
PaulAsjes merged 3 commits into
mainfrom
pma/add-seng-details

Conversation

@PaulAsjes
Copy link
Copy Markdown
Collaborator

@PaulAsjes PaulAsjes commented May 21, 2026

We currently override the response from the get, create and update methods to return a Speech Engine resource instead of a response. That also means that the data returned from the API is lost to the end user. This adds it back as part of a config object that can be accessed. e.g.

engine = await elevenlabs_client.speech_engine.create(
    name="SDK test speech engine",
    speech_engine={
        "ws_url": "wss://pma.ngrok.dev/ws",
    },
    overrides={
        "first_message": True,
    },
)
});

print("Engine created with overrides:", engine.config.overrides)

await engine.serve(...);

Also includes missing overrides hash in the API request models.


Note

Low Risk
Low risk: additive changes to the Speech Engine client surface (new optional overrides parameter and a stored response object) plus a patch version bump, with minimal impact on existing request/response handling.

Overview
Speech Engine resources returned from create/get/update now retain the full SpeechEngineResponse: SpeechEngineResource accepts the API response and exposes it via engine.config for downstream access (e.g., engine.config.asr, engine.config.overrides).

Adds an optional overrides parameter to Speech Engine create (sync/async) and wires it through to the raw POST body as overrides, using the new SpeechEngineConversationInitiationClientDataConfig model. Also bumps SDK version to 2.49.1 and updates the User-Agent/X-Fern-SDK-Version headers accordingly.

Reviewed by Cursor Bugbot for commit 682494f. Bugbot is set up for automated code reviews on this repo. Configure here.

@PaulAsjes PaulAsjes requested a review from kraenhansen May 21, 2026 10:14
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ddc0ee3. Configure here.

Comment thread src/elevenlabs/speech_engine/resource.py Outdated
@PaulAsjes PaulAsjes merged commit 2143cac into main May 21, 2026
5 checks passed
@PaulAsjes PaulAsjes deleted the pma/add-seng-details branch May 21, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants