pub trait RealtimeSessionExt: RealtimeSession {
// Provided methods
fn send_audio_and_wait<'life0, 'life1, 'async_trait>(
&'life0 self,
audio: &'life1 AudioChunk,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServerEvent>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn send_text_and_wait<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServerEvent>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn collect_audio<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<u8>>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Extension trait for RealtimeSession with convenience methods.
Provided Methods§
Sourcefn send_audio_and_wait<'life0, 'life1, 'async_trait>(
&'life0 self,
audio: &'life1 AudioChunk,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServerEvent>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_audio_and_wait<'life0, 'life1, 'async_trait>(
&'life0 self,
audio: &'life1 AudioChunk,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServerEvent>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send audio and wait for the response to complete.