-
Notifications
You must be signed in to change notification settings - Fork 82
feat: officially enable aura-2 in live text-to-speech #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
## Walkthrough
The default text-to-speech model identifier has been updated from "aura-asteria-en" to "aura-2-thalia-en" across REST and WebSocket client options, example scripts, test constants, and related test JSON data. No other logic, error handling, or control flow was changed.
## Changes
| File(s) | Change Summary |
|----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|
| deepgram/clients/speak/v1/rest/options.py | Updated default `model` value in `SpeakRESTOptions` dataclass from "aura-asteria-en" to "aura-2-thalia-en". |
| deepgram/clients/speak/v1/websocket/options.py | Updated default `model` value in `SpeakWSOptions` dataclass from "aura-asteria-en" to "aura-2-thalia-en". |
| examples/text-to-speech/websocket/async_simple/main.py<br>examples/text-to-speech/websocket/output_to_wav/main.py<br>examples/text-to-speech/websocket/simple/main.py | Updated model parameter in `SpeakWSOptions` from "aura-asteria-en" to "aura-2-thalia-en". |
| tests/daily_test/test_daily_async_speak_rest.py<br>tests/daily_test/test_daily_speak_rest.py | Changed `TTS_MODEL` constant from "aura-asteria-en" to "aura-2-thalia-en". |
| tests/response_data/speak/rest/18144fa7f4709bc9972c24d0addc8faa360dca933e7e0027b062e57b7c41f426-f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef-options.json | Updated model identifier in JSON from "aura-asteria-en" to "aura-2-thalia-en". |
| tests/response_data/speak/rest/18144fa7f4709bc9972c24d0addc8faa360dca933e7e0027b062e57b7c41f426-f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef-response.json | Updated "model_name" field in JSON from "aura-asteria-en" to "aura-2-thalia-en". |
| tests/unit_test/test_unit_async_speak_rest.py<br>tests/unit_test/test_unit_speak_rest.py | Updated `MODEL` constant and expected `"model_name"` in output from "aura-asteria-en" to "aura-2-thalia-en". |
| tests/response_data/speak/rest/1fe0ad339338a9d6cffbab2c7ace41ba5387b5fe7906854795702dce91034fd3-f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef-options.json<br>tests/response_data/speak/rest/1fe0ad339338a9d6cffbab2c7ace41ba5387b5fe7906854795702dce91034fd3-f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef-response.json<br>tests/response_data/speak/rest/1fe0ad339338a9d6cffbab2c7ace41ba5387b5fe7906854795702dce91034fd3-f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef.cmd | Added new JSON option, response, and command files related to the "aura-2-thalia-en" model. |
| tests/response_data/listen/rest/a231370d439312b1a404bb6ad8de955e900ec8eae9a906329af8cc672e6ec7ba-29e7c8100617f70da4ae9da1921cb5071a01219f4780ca70930b0a370ed2163a-response.json<br>tests/response_data/listen/rest/a231370d439312b1a404bb6ad8de955e900ec8eae9a906329af8cc672e6ec7ba-a17f4880c5b4cf124ac54d06d77c9f0ab7f3fe1052ff1c7b090f7eaf8ede5b76-response.json<br>tests/response_data/listen/rest/c4e1c0031174878d8f0e3dbd87916ee16d56f1c610ac525af5712ea37226a455-29e7c8100617f70da4ae9da1921cb5071a01219f4780ca70930b0a370ed2163a-response.json<br>tests/response_data/listen/rest/c4e1c0031174878d8f0e3dbd87916ee16d56f1c610ac525af5712ea37226a455-a17f4880c5b4cf124ac54d06d77c9f0ab7f3fe1052ff1c7b090f7eaf8ede5b76-response.json | Updated JSON listen REST response files with new request IDs, timestamps, minor timing and confidence score adjustments, and slight summary text changes. |
| tests/response_data/listen/rest/a231370d439312b1a404bb6ad8de955e900ec8eae9a906329af8cc672e6ec7ba-a17f4880c5b4cf124ac54d06d77c9f0ab7f3fe1052ff1c7b090f7eaf8ede5b76-error.json | Modified "actual" text in JSON error response to reference "Better Union movement" instead of previous phrasing. |
| tests/response_data/read/rest/3917a1c81c08e360c0d4bba0ff9ebd645e610e4149483e5f2888a2c5df388b37-23e873efdfd4d680286fda14ff8f10864218311e79efc92ecc82bce3e574c366-error.json<br>tests/response_data/read/rest/3917a1c81c08e360c0d4bba0ff9ebd645e610e4149483e5f2888a2c5df388b37-23e873efdfd4d680286fda14ff8f10864218311e79efc92ecc82bce3e574c366-response.json | Removed specific sentences and simplified phrases in JSON read REST error and response files, updating metadata accordingly. |
## Possibly related PRs
- deepgram/deepgram-python-sdk#514: Both PRs update the default text-to-speech model from "aura-asteria-en" to "aura-2-thalia-en" in various configurations and example usages, reflecting the same model version change.
- deepgram/deepgram-python-sdk#434: Related to SpeakWSOptions and TTS WebSocket client functionality; this PR only updates the default model value without modifying client logic.
## Suggested reviewers
- SandraRodgers
- jpvajda Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
✅ Files skipped from review due to trivial changes (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
deepgram/clients/speak/v1/rest/options.py
(1 hunks)deepgram/clients/speak/v1/websocket/options.py
(1 hunks)examples/text-to-speech/websocket/async_simple/main.py
(1 hunks)examples/text-to-speech/websocket/output_to_wav/main.py
(1 hunks)examples/text-to-speech/websocket/simple/main.py
(1 hunks)tests/daily_test/test_daily_async_speak_rest.py
(1 hunks)tests/daily_test/test_daily_speak_rest.py
(1 hunks)tests/response_data/speak/rest/18144fa7f4709bc9972c24d0addc8faa360dca933e7e0027b062e57b7c41f426-f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef-options.json
(1 hunks)tests/response_data/speak/rest/18144fa7f4709bc9972c24d0addc8faa360dca933e7e0027b062e57b7c41f426-f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef-response.json
(1 hunks)tests/unit_test/test_unit_async_speak_rest.py
(2 hunks)tests/unit_test/test_unit_speak_rest.py
(2 hunks)
🧰 Additional context used
🪛 GitHub Actions: Test - Unit
tests/unit_test/test_unit_speak_rest.py
[error] 54-54: FileNotFoundError: Missing file 'tests/response_data/speak/rest/1fe0ad339338a9d6cffbab2c7ace41ba5387b5fe7906854795702dce91034fd3-f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef-response.json' required for test.
tests/unit_test/test_unit_async_speak_rest.py
[error] 55-55: FileNotFoundError: Missing file 'tests/response_data/speak/rest/1fe0ad339338a9d6cffbab2c7ace41ba5387b5fe7906854795702dce91034fd3-f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef-response.json' required for test.
🔇 Additional comments (12)
examples/text-to-speech/websocket/output_to_wav/main.py (1)
60-60
: Update default TTS model to aura-2-thalia-en
TheSpeakWSOptions
model parameter has been updated from"aura-asteria-en"
to"aura-2-thalia-en"
, aligning this example with the new live TTS model. All other settings remain unchanged.tests/response_data/speak/rest/18144fa7f4709bc9972c24d0addc8faa360dca933e7e0027b062e57b7c41f426-f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef-options.json (1)
1-1
: Align test options JSON with new model identifier
The"model"
field has been correctly updated to"aura-2-thalia-en"
to reflect the live TTS change. Encoding and sample rate remain consistent.tests/response_data/speak/rest/18144fa7f4709bc9972c24d0addc8faa360dca933e7e0027b062e57b7c41f426-f8c3bf62a9aa3e6fc1619c250e48abe7519373d3edf41be62eb5dc45199af2ef-response.json (1)
1-1
: Update test response JSON to use aura-2-thalia-en
The"model_name"
field in this response fixture has been updated to"aura-2-thalia-en"
, ensuring test expectations match the new default TTS model.examples/text-to-speech/websocket/async_simple/main.py (1)
93-93
: Switch async example to aura-2-thalia-en model
TheSpeakWSOptions
invocation now uses"aura-2-thalia-en"
, keeping this async example in sync with the live TTS rollout.examples/text-to-speech/websocket/simple/main.py (1)
84-84
: Update simple example model to aura-2-thalia-en
Themodel
argument has been changed to"aura-2-thalia-en"
to reflect the new default model in this simple websocket example.tests/daily_test/test_daily_speak_rest.py (2)
15-15
: Update default TTS model constant
TheTTS_MODEL
constant has been correctly updated to"aura-2-thalia-en"
to align with the new default across the SDK.
15-15
: Refresh daily test fixtures
Changing the default model affects the generated filenames and JSON content undertests/response_data/speak/rest/
. Please rerun the daily tests to regenerate and commit the updated fixtures.tests/unit_test/test_unit_speak_rest.py (1)
18-18
: Update unit test model constant
TheMODEL
constant has been updated to"aura-2-thalia-en"
, matching the new default inSpeakRESTOptions
.tests/unit_test/test_unit_async_speak_rest.py (1)
18-18
: Update async unit test model constant
TheMODEL
constant has been updated to"aura-2-thalia-en"
, aligning with the updated default inSpeakRESTOptions
.deepgram/clients/speak/v1/rest/options.py (1)
26-26
: Approve default REST model update
The defaultmodel
value inSpeakRESTOptions
has been updated to"aura-2-thalia-en"
, keeping it consistent with the WebSocket client and example scripts.deepgram/clients/speak/v1/websocket/options.py (1)
26-26
: Approve default WebSocket model update
The defaultmodel
value inSpeakWSOptions
has been updated to"aura-2-thalia-en"
, aligning it with the REST client and example scripts.tests/daily_test/test_daily_async_speak_rest.py (1)
15-15
:✅ Verification successful
Confirm updated model and fixtures consistency.
The
TTS_MODEL
constant has been correctly updated to"aura-2-thalia-en"
, aligning with the new default across REST and WS clients. Please verify that all persisted test fixtures (JSON, WAV, CMD files undertests/response_data/speak/rest/
) have been regenerated or updated to reference this new model identifier so the test does not fail due to missing or mismatched files.Run this script to ensure your fixtures include the new model name:
🏁 Script executed:
#!/bin/bash # Verify fixtures reference aura-2-thalia-en rg -n '"aura-2-thalia-en"' tests/response_data/speak/restLength of output: 751
#!/bin/bash
echo "Listing all fixture files in tests/response_data/speak/rest:"
ls -1 tests/response_data/speak/rest
echo
echo "Checking JSON and CMD fixtures that do NOT reference "aura-2-thalia-en":"
rg -L '"aura-2-thalia-en"' -g '.json' -g '.cmd' tests/response_data/speak/rest || true
🏁 Script executed:
#!/bin/bash # Count all JSON and CMD fixtures total=$(find tests/response_data/speak/rest -type f \( -name '*.json' -o -name '*.cmd' \) | wc -l) echo "Total JSON and CMD fixtures: $total" # Count fixtures referencing the new model referenced=$(rg -l '"aura-2-thalia-en"' -g '*.json' -g '*.cmd' tests/response_data/speak/rest | wc -l) echo "Fixtures referencing aura-2-thalia-en: $referenced" # List fixtures missing the new model reference echo "Fixtures missing aura-2-thalia-en:" rg -L '"aura-2-thalia-en"' -g '*.json' -g '*.cmd' tests/response_data/speak/rest || trueLength of output: 1225
🏁 Script executed:
#!/bin/bash # Identify the .cmd fixture file cmd_file=$(find tests/response_data/speak/rest -type f -name '*.cmd' | head -n1) echo "CMD fixture file:" echo "$cmd_file" echo echo "Contents of the .cmd fixture (first 20 lines):" sed -n '1,20p' "$cmd_file"Length of output: 935
All REST speak fixtures reference the new model
Verified that both JSON fixtures undertests/response_data/speak/rest/
now include"aura-2-thalia-en"
. There are no WAV fixtures, and the single.cmd
file contains only the input text (no model identifier expected). All tests should pass without further updates.
@@ -27,7 +27,7 @@ | |||
SpeakOptions(model=MODEL, encoding="linear16", sample_rate=24000), | |||
{ | |||
"content_type": ["audio/wav"], | |||
"model_name": ["aura-asteria-en"], | |||
"model_name": ["aura-2-thalia-en"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure JSON fixtures reflect new model name
The expected "model_name"
was updated to "aura-2-thalia-en"
, but the unit test is failing due to missing response fixtures under tests/response_data/speak/rest/
. You need to regenerate or rename those JSON files to match the new hash-based filenames.
Would you like a script to automate fixture regeneration or renaming?
🤖 Prompt for AI Agents (early access)
In tests/unit_test/test_unit_speak_rest.py at line 30, the "model_name" was
updated to "aura-2-thalia-en" but the test fails because the response fixture
files in tests/response_data/speak/rest/ do not match the new model name's
hash-based filenames. To fix this, regenerate the JSON fixture files or rename
the existing ones to correspond with the new model name's hash filenames so the
test can find the correct fixtures.
@@ -27,7 +27,7 @@ | |||
SpeakOptions(model=MODEL, encoding="linear16", sample_rate=24000), | |||
{ | |||
"content_type": ["audio/wav"], | |||
"model_name": ["aura-asteria-en"], | |||
"model_name": ["aura-2-thalia-en"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure fixtures for async test
The expected "model_name"
was updated, but the test reports missing JSON fixtures under tests/response_data/speak/rest/
. Please regenerate or rename these fixtures to match the new hash-based filenames.
Can I provide a script to handle fixture updates?
🤖 Prompt for AI Agents (early access)
In tests/unit_test/test_unit_async_speak_rest.py at line 30, the "model_name"
value was updated, causing a mismatch with existing JSON fixtures under
tests/response_data/speak/rest/. To fix this, regenerate or rename the JSON
fixture files to match the new hash-based filenames corresponding to the updated
"model_name". This ensures the test can locate the correct fixtures. If needed,
use or create a script to automate updating these fixture filenames.
Summary by CodeRabbit
New Features
Tests
Bug Fixes
Documentation