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
| Name | Type | Description |
|---|---|---|
voice | String | Voice for TTS (e.g., “alloy”, “echo”, “fable”, “onyx”, “nova”, “shimmer”) |
speed | f32 | Speed multiplier (0.25 to 4.0) |
response_format | String | Response format (mp3, opus, aac, flac, wav, pcm) |
language | Option<String> | Language for STT |
temperature | f32 | Temperature for STT |
timeout | u32 | Timeout in seconds |
api_base | Option<String> | API base URL |
api_key | Option<String> | API key |
Methods
new
fn new() -> SelfCreate a new AudioConfig with default values
voice
fn voice(mut self, voice: impl Into<String>) -> SelfSet the voice
Parameters:
| Name | Type |
|---|---|
voice | impl Into<String> |
speed
fn speed(mut self, speed: f32) -> SelfSet the speed
Parameters:
| Name | Type |
|---|---|
speed | f32 |
response_format
fn response_format(mut self, format: impl Into<String>) -> SelfSet the response format
Parameters:
| Name | Type |
|---|---|
format | impl Into<String> |
language
fn language(mut self, language: impl Into<String>) -> SelfSet the language
Parameters:
| Name | Type |
|---|---|
language | impl Into<String> |
timeout
fn timeout(mut self, timeout: u32) -> SelfSet the timeout
Parameters:
| Name | Type |
|---|---|
timeout | u32 |
Source
View on GitHubpraisonai/src/agents/mod.rs at line 35