pub struct DeepgramStt { /* private fields */ }Available on crate feature
audio only.Expand description
Deepgram Nova STT provider.
Uses the Deepgram /v1/listen endpoint.
Configure via DEEPGRAM_API_KEY environment variable.
Implementations§
Source§impl DeepgramStt
impl DeepgramStt
Sourcepub fn from_env() -> Result<DeepgramStt, AudioError>
Available on crate feature stt only.
pub fn from_env() -> Result<DeepgramStt, AudioError>
stt only.Create from environment variable DEEPGRAM_API_KEY.
Trait Implementations§
Source§impl SttProvider for DeepgramStt
impl SttProvider for DeepgramStt
Source§fn transcribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
audio: &'life1 AudioFrame,
opts: &'life2 SttOptions,
) -> Pin<Box<dyn Future<Output = Result<Transcript, AudioError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
DeepgramStt: 'async_trait,
fn transcribe<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
audio: &'life1 AudioFrame,
opts: &'life2 SttOptions,
) -> Pin<Box<dyn Future<Output = Result<Transcript, AudioError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
DeepgramStt: 'async_trait,
Transcribe a single audio frame (batch mode).
Source§fn transcribe_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
audio: Pin<Box<dyn Stream<Item = AudioFrame> + Send>>,
opts: &'life1 SttOptions,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Transcript, AudioError>> + Send>>, AudioError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
DeepgramStt: 'async_trait,
fn transcribe_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
audio: Pin<Box<dyn Stream<Item = AudioFrame> + Send>>,
opts: &'life1 SttOptions,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Transcript, AudioError>> + Send>>, AudioError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
DeepgramStt: 'async_trait,
Transcribe a stream of audio frames (streaming mode).
Auto Trait Implementations§
impl Freeze for DeepgramStt
impl !RefUnwindSafe for DeepgramStt
impl Send for DeepgramStt
impl Sync for DeepgramStt
impl Unpin for DeepgramStt
impl UnsafeUnpin for DeepgramStt
impl !UnwindSafe for DeepgramStt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more