Audio Config • Rust AI Agent SDK

AudioConfig: Configuration for audio processing settings.

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

rust
fn new() -> Self

Create a new AudioConfig with default values

voice

rust
fn voice(mut self, voice: impl Into<String>) -> Self

Set the voice

Parameters:

NameType
voiceimpl Into&lt;String&gt;

speed

rust
fn speed(mut self, speed: f32) -> Self

Set the speed

Parameters:

NameType
speedf32

response_format

rust
fn response_format(mut self, format: impl Into<String>) -> Self

Set the response format

Parameters:

NameType
formatimpl Into&lt;String&gt;

language

rust
fn language(mut self, language: impl Into<String>) -> Self

Set the language

Parameters:

NameType
languageimpl Into&lt;String&gt;

timeout

rust
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


Related Documentation