Skip to main content

VoiceHandler

Trait VoiceHandler 

Source
pub trait VoiceHandler: Send + Sync {
    // Required methods
    fn process_audio<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        audio_data: &'life1 [u8],
        mime_type: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<String, PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn synthesize<'life0, 'life1, 'async_trait>(
        &'life0 self,
        text: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, String), PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Placeholder trait for voice/audio processing (Workstream G).

This trait is defined now to reserve the capability type and ensure forward-compatibility. Implementations will be added when Workstream G begins. The voice feature flag gates any voice-specific dependencies.

Required Methods§

Source

fn process_audio<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, audio_data: &'life1 [u8], mime_type: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<String, PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Process raw audio input and return a transcription or response.

audio_data is raw audio bytes. mime_type indicates the format (e.g., "audio/wav", "audio/opus").

Source

fn synthesize<'life0, 'life1, 'async_trait>( &'life0 self, text: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, String), PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Synthesize text into audio output.

Returns audio bytes and the MIME type of the output format.

Implementors§