pub struct AudioPipelineBuilder { /* private fields */ }audio only.Expand description
Implementations§
Source§impl AudioPipelineBuilder
impl AudioPipelineBuilder
Sourcepub fn new() -> AudioPipelineBuilder
pub fn new() -> AudioPipelineBuilder
Create a new builder with default settings.
Sourcepub fn tts(self, tts: Arc<dyn TtsProvider>) -> AudioPipelineBuilder
pub fn tts(self, tts: Arc<dyn TtsProvider>) -> AudioPipelineBuilder
Set the TTS provider.
Sourcepub fn stt(self, stt: Arc<dyn SttProvider>) -> AudioPipelineBuilder
pub fn stt(self, stt: Arc<dyn SttProvider>) -> AudioPipelineBuilder
Set the STT provider.
Sourcepub fn music(self, music: Arc<dyn MusicProvider>) -> AudioPipelineBuilder
pub fn music(self, music: Arc<dyn MusicProvider>) -> AudioPipelineBuilder
Set the music generation provider.
Sourcepub fn vad(self, vad: Arc<dyn VadProcessor>) -> AudioPipelineBuilder
pub fn vad(self, vad: Arc<dyn VadProcessor>) -> AudioPipelineBuilder
Set the VAD processor.
Sourcepub fn pre_fx(self, fx: FxChain) -> AudioPipelineBuilder
pub fn pre_fx(self, fx: FxChain) -> AudioPipelineBuilder
Set the pre-processing FX chain (applied before STT/VAD).
Sourcepub fn post_fx(self, fx: FxChain) -> AudioPipelineBuilder
pub fn post_fx(self, fx: FxChain) -> AudioPipelineBuilder
Set the post-processing FX chain (applied after TTS).
Sourcepub fn agent(self, agent: Arc<dyn Agent>) -> AudioPipelineBuilder
pub fn agent(self, agent: Arc<dyn Agent>) -> AudioPipelineBuilder
Set the agent for voice agent pipelines.
Sourcepub fn buffer_size(self, size: usize) -> AudioPipelineBuilder
pub fn buffer_size(self, size: usize) -> AudioPipelineBuilder
Set the channel buffer size (default: 32).
Sourcepub fn build_tts(self) -> Result<PipelineHandle, AudioError>
pub fn build_tts(self) -> Result<PipelineHandle, AudioError>
Build a TTS-only pipeline (Text → TTS → Audio).
Sourcepub fn build_stt(self) -> Result<PipelineHandle, AudioError>
pub fn build_stt(self) -> Result<PipelineHandle, AudioError>
Build an STT-only pipeline (Audio → STT → Transcript).
Sourcepub fn build_voice_agent(self) -> Result<PipelineHandle, AudioError>
pub fn build_voice_agent(self) -> Result<PipelineHandle, AudioError>
Build a voice agent pipeline (Audio → VAD → STT → Agent → TTS → Audio).
Requires tts, stt, vad, and agent to be set.
When the desktop-audio feature is enabled and both capture and playback
are configured, the caller should use the returned PipelineHandle to wire
the capture stream into input_tx and route output_rx audio frames to
playback. Starting capture requires a device ID and CaptureConfig,
and playback requires a device ID, so the builder stores the instances and
the caller completes the wiring at runtime.
Sourcepub fn build_transform(self) -> Result<PipelineHandle, AudioError>
pub fn build_transform(self) -> Result<PipelineHandle, AudioError>
Build a transform-only pipeline (Audio → FxChain → Audio).
Sourcepub fn build_music(self) -> Result<PipelineHandle, AudioError>
pub fn build_music(self) -> Result<PipelineHandle, AudioError>
Build a music generation pipeline (Text → MusicProvider → Audio).