All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Update documentation to point to deepgram/deepgram-rust-sdk.
- Implement
From<String>
forModel
,Language
, andRedact
- Add callback support to websocket connections.
0.6.0 - 2024-08-08
use deepgram::{
--- transcription::prerecorded::{
+++ common::{
audio_source::AudioSource,
options::{Language, Options},
},
Deepgram, DeepgramError,
};
We have exposed a low-level, message-based interface to the websocket API:
use futures::select;
let mut handle = dg
.transcription()
.stream_request()
.handle()
.await?;
loop {
select! {
_ = tokio::time::sleep(Duration::from_secs(3)) => handle.keep_alive().await,
_ = handle.send_data(data_chunk()).fuse() => {}
response = handle.receive().fuse() => {
match response {
Some(response) => println!("{response:?}"),
None => break,
}
}
}
}
handle.close_stream().await;
No need to call .start()
to begin streaming data.
let mut results = dg
.transcription()
.stream_request_with_options(Some(&options))
.file(PATH_TO_FILE, AUDIO_CHUNK_SIZE, Duration::from_millis(16))
--- .await
--- .start()
.await;
Now you can pass Options using stream_request_with_options
let options = Options::builder()
.smart_format(true)
.language(Language::en_US)
.build();
let mut results = dg
.transcription()
.stream_request_with_options(Some(&options))
.file(PATH_TO_FILE, AUDIO_CHUNK_SIZE, Duration::from_millis(16))
.await?
Some Enums have changed and may need to be updated
- Add streaming features
- Add support for pre-recorded features when streaming
- Add Speech to Text
- Reorganize Code
- endpointing
- utterance_end_ms
- interim_results
- no_delay
- vad_events
- keep_alive
- Utterance End
- Speech Started
- encoding
- smart_format
- callback
- callback_method
- filler_words
- paragraphs
- diarize_version
- dictation
- measurements
- extra
- detect_entities
- sentiment
- topics
- summarize
- intents
- custom_intents
- custom_intent_mode
- topics
- custom_topics
- custom_topic_mode
0.5.0 - 2024-07-08
- Deprecate tiers and add explicit support for all currently available models.
- Expand language enum to include all currently-supported languages.
- Add (default on) feature flags for live and prerecorded transcription.
- Support arbitrary query params in transcription options.
0.4.0 - 2023-11-01
detect_language
option.
- Remove generic from
Deepgram
struct. - Upgrade dependencies:
tungstenite
,tokio-tungstenite
,reqwest
.
0.3.0 - 2023-07-26
- Derive
Serialize
for all response types.
- Use the users builder options when building a streaming URL.
- Make sure that
Future
returned fromStreamRequestBuilder::start()
isSend
.
- Use Rustls instead of OpenSSL.