Skip to content

Commit bf68cae

Browse files
committed
feat(0.10.0): Phase 8 — Speak REST polish and STT/TTS shared cleanup
8a. Speak REST: add speed, callback, callback_method, tag, mip_opt_out 8b. Speak Model: replace 13-variant enum with newtype + const fn constructors for all 62 spec'd Aura voices, plus Model::custom 8c. STT: add mip_opt_out builder 8d. STT WS enum extensions: Encoding::{Alaw, OggOpus}, Redact::AggressiveNumbers, CallbackMethod::{GET, DELETE} 8e. Drop undocumented STT fields: ner, alternatives, diarize_version, keyword_boost_legacy, ListenMetadata.language BREAKING CHANGE: speak::options::Model variants → constructors (e.g. Model::AuraAsteriaEn → Model::aura_asteria_en()), Model::CustomId(s) → Model::custom(s). Removes deprecated STT fields listed above.
1 parent e3292b1 commit bf68cae

10 files changed

Lines changed: 328 additions & 220 deletions

File tree

examples/speak/rest/text_to_speech_to_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async fn main() -> Result<(), DeepgramError> {
1313
let dg_client = Deepgram::new(&deepgram_api_key)?;
1414

1515
let options = Options::builder()
16-
.model(Model::AuraAsteriaEn)
16+
.model(Model::aura_asteria_en())
1717
.encoding(Encoding::Linear16)
1818
.sample_rate(16000)
1919
.container(Container::Wav)

examples/speak/rest/text_to_speech_to_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ async fn main() -> Result<(), DeepgramError> {
9898
let channels = 1;
9999

100100
let options = Options::builder()
101-
.model(Model::AuraAsteriaEn)
101+
.model(Model::aura_asteria_en())
102102
.encoding(Encoding::Linear16)
103103
.sample_rate(sample_rate)
104104
.container(Container::Wav)

examples/speak/websocket/flush_clear.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ async fn main() -> Result<(), DeepgramError> {
4141
let (mut handle, mut stream) = dg
4242
.text_to_speech()
4343
.websocket()
44-
.model(Model::AuraAsteriaEn)
44+
.model(Model::aura_asteria_en())
4545
.encoding(Encoding::Linear16)
4646
.sample_rate(24_000)
4747
.start()

examples/speak/websocket/simple_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async fn main() -> Result<(), DeepgramError> {
4242
let (mut handle, mut stream) = dg
4343
.text_to_speech()
4444
.websocket()
45-
.model(Model::AuraAsteriaEn)
45+
.model(Model::aura_asteria_en())
4646
.encoding(Encoding::Linear16)
4747
.sample_rate(24_000)
4848
.start()

examples/transcription/rest/prerecorded_from_url.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ async fn main() -> Result<(), DeepgramError> {
2626
.redact([Redact::Pci, Redact::Other(String::from("cvv"))])
2727
.detect_language(DetectLanguage::Restricted(vec![Language::en, Language::es]))
2828
.diarize(true)
29-
.diarize_version("2021-07-14.0")
3029
.filler_words(true)
3130
.smart_format(true)
3231
.encoding(Encoding::Linear16)

src/common/batch_response.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ pub struct ListenMetadata {
6262
#[allow(missing_docs)]
6363
pub channels: usize,
6464

65-
/// Top-level language. Not in the current
66-
/// `ListenV1ResponseMetadata` schema (the language is on each
67-
/// channel via `ChannelResult.detected_language`); kept for
68-
/// backward compatibility, will be removed in 0.10.0 (Phase 8e).
69-
pub language: Option<String>,
70-
7165
/// Model UUIDs that served the request.
7266
#[serde(default, skip_serializing_if = "Option::is_none")]
7367
pub models: Option<Vec<String>>,

0 commit comments

Comments
 (0)