From f82c83aca67749336229216e70903a773eb1edf5 Mon Sep 17 00:00:00 2001 From: John Vajda Date: Mon, 7 Apr 2025 17:51:09 -0600 Subject: [PATCH 1/2] fix: updates examples to aura-2 --- examples/text-to-speech/rest/file/async_hello_world/main.py | 2 +- examples/text-to-speech/rest/file/hello_world/main.py | 2 +- .../text-to-speech/rest/file/legacy_dict_hello_world/main.py | 2 +- examples/text-to-speech/rest/file/woodchuck/main.py | 2 +- examples/text-to-speech/rest/memory/async_hello_world/main.py | 2 +- examples/text-to-speech/rest/memory/hello_world/main.py | 2 +- examples/text-to-speech/rest/raw/async_hello_world/main.py | 2 +- examples/text-to-speech/rest/raw/hello_world/main.py | 2 +- examples/text-to-speech/rest/raw/hello_world_play/main.py | 2 +- examples/text-to-speech/websocket/async_simple/main.py | 2 +- examples/text-to-speech/websocket/output_to_wav/main.py | 2 +- examples/text-to-speech/websocket/simple/main.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/text-to-speech/rest/file/async_hello_world/main.py b/examples/text-to-speech/rest/file/async_hello_world/main.py index 21445631..ab1c3940 100644 --- a/examples/text-to-speech/rest/file/async_hello_world/main.py +++ b/examples/text-to-speech/rest/file/async_hello_world/main.py @@ -26,7 +26,7 @@ async def main(): # STEP 2 Call the save method on the asyncspeak property options = SpeakOptions( - model="aura-asteria-en", + model="aura-2-thalia-en", ) response = await deepgram.speak.asyncrest.v("1").save( diff --git a/examples/text-to-speech/rest/file/hello_world/main.py b/examples/text-to-speech/rest/file/hello_world/main.py index ef6e3429..b14b8a19 100644 --- a/examples/text-to-speech/rest/file/hello_world/main.py +++ b/examples/text-to-speech/rest/file/hello_world/main.py @@ -28,7 +28,7 @@ def main(): # STEP 2 Call the save method on the speak property options = SpeakOptions( - model="aura-asteria-en", + model="aura-2-thalia-en", ) response = deepgram.speak.rest.v("1").save(filename, SPEAK_TEXT, options) diff --git a/examples/text-to-speech/rest/file/legacy_dict_hello_world/main.py b/examples/text-to-speech/rest/file/legacy_dict_hello_world/main.py index 3c522bbd..06300975 100644 --- a/examples/text-to-speech/rest/file/legacy_dict_hello_world/main.py +++ b/examples/text-to-speech/rest/file/legacy_dict_hello_world/main.py @@ -26,7 +26,7 @@ def main(): # STEP 2 Call the save method on the speak property options = { - "model": "aura-asteria-en", + "model": "aura-2-thalia-en", } response = deepgram.speak.rest.v("1").save(filename, SPEAK_TEXT, options) diff --git a/examples/text-to-speech/rest/file/woodchuck/main.py b/examples/text-to-speech/rest/file/woodchuck/main.py index 1f72661a..fb058e08 100644 --- a/examples/text-to-speech/rest/file/woodchuck/main.py +++ b/examples/text-to-speech/rest/file/woodchuck/main.py @@ -28,7 +28,7 @@ def main(): # STEP 2 Call the save method on the speak property options = SpeakOptions( - model="aura-asteria-en", + model="aura-2-thalia-en", ) response = deepgram.speak.rest.v("1").save(filename, SPEAK_TEXT, options) diff --git a/examples/text-to-speech/rest/memory/async_hello_world/main.py b/examples/text-to-speech/rest/memory/async_hello_world/main.py index ffd32969..1a1eb141 100644 --- a/examples/text-to-speech/rest/memory/async_hello_world/main.py +++ b/examples/text-to-speech/rest/memory/async_hello_world/main.py @@ -26,7 +26,7 @@ async def main(): # STEP 2 Call the save method on the asyncspeak property options = SpeakOptions( - model="aura-asteria-en", + model="aura-2-thalia-en", ) response = await deepgram.speak.asyncrest.v("1").stream_memory( diff --git a/examples/text-to-speech/rest/memory/hello_world/main.py b/examples/text-to-speech/rest/memory/hello_world/main.py index 35288c00..18e04db7 100644 --- a/examples/text-to-speech/rest/memory/hello_world/main.py +++ b/examples/text-to-speech/rest/memory/hello_world/main.py @@ -28,7 +28,7 @@ def main(): # STEP 2 Call the save method on the speak property options = SpeakOptions( - model="aura-asteria-en", + model="aura-2-thalia-en", ) response = deepgram.speak.rest.v("1").stream_memory(SPEAK_TEXT, options) diff --git a/examples/text-to-speech/rest/raw/async_hello_world/main.py b/examples/text-to-speech/rest/raw/async_hello_world/main.py index 1f2cf0f0..42cf3366 100644 --- a/examples/text-to-speech/rest/raw/async_hello_world/main.py +++ b/examples/text-to-speech/rest/raw/async_hello_world/main.py @@ -30,7 +30,7 @@ async def main(): # STEP 2 Call the save method on the asyncspeak property options = SpeakOptions( - model="aura-asteria-en", + model="aura-2-thalia-en", ) response = await deepgram.speak.asyncrest.v("1").stream_raw(SPEAK_TEXT, options) diff --git a/examples/text-to-speech/rest/raw/hello_world/main.py b/examples/text-to-speech/rest/raw/hello_world/main.py index 2f8d6e0d..7d3f876e 100644 --- a/examples/text-to-speech/rest/raw/hello_world/main.py +++ b/examples/text-to-speech/rest/raw/hello_world/main.py @@ -29,7 +29,7 @@ def main(): # STEP 2 Call the save method on the speak property options = SpeakOptions( - model="aura-asteria-en", + model="aura-2-thalia-en", ) response = deepgram.speak.rest.v("1").stream_raw(SPEAK_TEXT, options) diff --git a/examples/text-to-speech/rest/raw/hello_world_play/main.py b/examples/text-to-speech/rest/raw/hello_world_play/main.py index 3e84e9eb..e50caa5b 100644 --- a/examples/text-to-speech/rest/raw/hello_world_play/main.py +++ b/examples/text-to-speech/rest/raw/hello_world_play/main.py @@ -64,7 +64,7 @@ def main(): # STEP 2: Call the save method on the speak property options = SpeakOptions( - model="aura-asteria-en", + model="aura-2-thalia-en", encoding="linear16", container="none", sample_rate=48000, diff --git a/examples/text-to-speech/websocket/async_simple/main.py b/examples/text-to-speech/websocket/async_simple/main.py index 87f238d3..af98fc84 100644 --- a/examples/text-to-speech/websocket/async_simple/main.py +++ b/examples/text-to-speech/websocket/async_simple/main.py @@ -90,7 +90,7 @@ async def on_unhandled(self, unhandled, **kwargs): # connect to websocket options = SpeakWSOptions( - model="aura-asteria-en", + model="aura-2-thalia-en", encoding="linear16", sample_rate=16000, ) diff --git a/examples/text-to-speech/websocket/output_to_wav/main.py b/examples/text-to-speech/websocket/output_to_wav/main.py index b5a5629b..7fa7955c 100644 --- a/examples/text-to-speech/websocket/output_to_wav/main.py +++ b/examples/text-to-speech/websocket/output_to_wav/main.py @@ -57,7 +57,7 @@ def on_close(self, close, **kwargs): # connect to websocket options = SpeakWSOptions( - model="aura-asteria-en", + model="aura-2-thalia-en", encoding="linear16", sample_rate=16000, ) diff --git a/examples/text-to-speech/websocket/simple/main.py b/examples/text-to-speech/websocket/simple/main.py index 612ae7da..8b8b09e0 100644 --- a/examples/text-to-speech/websocket/simple/main.py +++ b/examples/text-to-speech/websocket/simple/main.py @@ -81,7 +81,7 @@ def on_unhandled(self, unhandled, **kwargs): # connect to websocket options = SpeakWSOptions( - model="aura-asteria-en", + model="aura-2-thalia-en", encoding="linear16", sample_rate=16000, ) From 18a137fd2c0860d9d3950c9f042545d99bd3a08e Mon Sep 17 00:00:00 2001 From: John Vajda Date: Mon, 14 Apr 2025 15:57:20 -0600 Subject: [PATCH 2/2] chore: removes aura-2 from WS --- examples/text-to-speech/websocket/async_simple/main.py | 2 +- examples/text-to-speech/websocket/output_to_wav/main.py | 2 +- examples/text-to-speech/websocket/simple/main.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/text-to-speech/websocket/async_simple/main.py b/examples/text-to-speech/websocket/async_simple/main.py index af98fc84..87f238d3 100644 --- a/examples/text-to-speech/websocket/async_simple/main.py +++ b/examples/text-to-speech/websocket/async_simple/main.py @@ -90,7 +90,7 @@ async def on_unhandled(self, unhandled, **kwargs): # connect to websocket options = SpeakWSOptions( - model="aura-2-thalia-en", + model="aura-asteria-en", encoding="linear16", sample_rate=16000, ) diff --git a/examples/text-to-speech/websocket/output_to_wav/main.py b/examples/text-to-speech/websocket/output_to_wav/main.py index 7fa7955c..b5a5629b 100644 --- a/examples/text-to-speech/websocket/output_to_wav/main.py +++ b/examples/text-to-speech/websocket/output_to_wav/main.py @@ -57,7 +57,7 @@ def on_close(self, close, **kwargs): # connect to websocket options = SpeakWSOptions( - model="aura-2-thalia-en", + model="aura-asteria-en", encoding="linear16", sample_rate=16000, ) diff --git a/examples/text-to-speech/websocket/simple/main.py b/examples/text-to-speech/websocket/simple/main.py index 8b8b09e0..612ae7da 100644 --- a/examples/text-to-speech/websocket/simple/main.py +++ b/examples/text-to-speech/websocket/simple/main.py @@ -81,7 +81,7 @@ def on_unhandled(self, unhandled, **kwargs): # connect to websocket options = SpeakWSOptions( - model="aura-2-thalia-en", + model="aura-asteria-en", encoding="linear16", sample_rate=16000, )