Skip to main content

AudioConfig

Defined in the agents module.
Rust AI Agent SDK Configuration for audio processing settings.

Fields

NameTypeDescription
voiceStringVoice for TTS (e.g., “alloy”, “echo”, “fable”, “onyx”, “nova”, “shimmer”)
speedf32Speed multiplier (0.25 to 4.0)
response_formatStringResponse format (mp3, opus, aac, flac, wav, pcm)
languageOption<String>Language for STT
temperaturef32Temperature for STT
timeoutu32Timeout in seconds
api_baseOption<String>API base URL
api_keyOption<String>API key

Methods

new

fn new() -> Self
Create a new AudioConfig with default values

voice

fn voice(mut self, voice: impl Into<String>) -> Self
Set the voice Parameters:
NameType
voiceimpl Into&lt;String&gt;

speed

fn speed(mut self, speed: f32) -> Self
Set the speed Parameters:
NameType
speedf32

response_format

fn response_format(mut self, format: impl Into<String>) -> Self
Set the response format Parameters:
NameType
formatimpl Into&lt;String&gt;

language

fn language(mut self, language: impl Into<String>) -> Self
Set the language Parameters:
NameType
languageimpl Into&lt;String&gt;

timeout

fn timeout(mut self, timeout: u32) -> Self
Set the timeout Parameters:
NameType
timeoutu32

Source

View on GitHub

praisonai/src/agents/mod.rs at line 35