Struct VoicePipeline
pub struct VoicePipeline { /* private fields */ }Implementations§
Source§impl VoicePipeline
impl VoicePipeline
Sourcepub fn from_config(config: &Config) -> Result<Self>
pub fn from_config(config: &Config) -> Result<Self>
Build a pipeline for the runtime-active agent, when one can be resolved.
pub fn from_config_for_agent( config: &Config, agent_alias: Option<&str>, ) -> Result<Self>
Sourcepub fn is_stt_available(&self) -> bool
pub fn is_stt_available(&self) -> bool
Returns true when the transcription half is enabled.
Sourcepub fn is_tts_available(&self) -> bool
pub fn is_tts_available(&self) -> bool
Returns true when the TTS half is enabled.
Sourcepub fn is_full_duplex(&self) -> bool
pub fn is_full_duplex(&self) -> bool
Returns true when both voice directions are enabled.
Sourcepub fn stt_providers(&self) -> Vec<String>
pub fn stt_providers(&self) -> Vec<String>
List registered transcription provider aliases.
Sourcepub fn tts_providers(&self) -> Vec<String>
pub fn tts_providers(&self) -> Vec<String>
List registered TTS provider aliases.
Sourcepub async fn transcribe(
&self,
audio_data: &[u8],
file_name: &str,
) -> Result<String>
pub async fn transcribe( &self, audio_data: &[u8], file_name: &str, ) -> Result<String>
Transcribe audio with the bound agent’s transcription provider.
Sourcepub async fn transcribe_with_provider(
&self,
audio_data: &[u8],
file_name: &str,
provider_alias: &str,
) -> Result<String>
pub async fn transcribe_with_provider( &self, audio_data: &[u8], file_name: &str, provider_alias: &str, ) -> Result<String>
Transcribe audio with an explicit transcription provider alias.
Sourcepub async fn synthesize(&self, text: &str) -> Result<Vec<u8>>
pub async fn synthesize(&self, text: &str) -> Result<Vec<u8>>
Synthesize speech with the bound agent’s TTS provider.
Auto Trait Implementations§
impl Freeze for VoicePipeline
impl !RefUnwindSafe for VoicePipeline
impl Send for VoicePipeline
impl Sync for VoicePipeline
impl Unpin for VoicePipeline
impl UnsafeUnpin for VoicePipeline
impl !UnwindSafe for VoicePipeline
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more