> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Audio Config • Rust AI Agent SDK

> AudioConfig: Configuration for audio processing settings.

# AudioConfig

> Defined in the [**agents**](../modules/agents) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

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&lt;String&gt;` | Language for STT                                                          |
| `temperature`     | `f32`                  | Temperature for STT                                                       |
| `timeout`         | `u32`                  | Timeout in seconds                                                        |
| `api_base`        | `Option&lt;String&gt;` | API base URL                                                              |
| `api_key`         | `Option&lt;String&gt;` | API key                                                                   |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new() -> Self
```

Create a new AudioConfig with default values

### `voice`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn voice(mut self, voice: impl Into<String>) -> Self
```

Set the voice

**Parameters:**

| Name    | Type                      |
| ------- | ------------------------- |
| `voice` | `impl Into&lt;String&gt;` |

### `speed`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn speed(mut self, speed: f32) -> Self
```

Set the speed

**Parameters:**

| Name    | Type  |
| ------- | ----- |
| `speed` | `f32` |

### `response_format`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn response_format(mut self, format: impl Into<String>) -> Self
```

Set the response format

**Parameters:**

| Name     | Type                      |
| -------- | ------------------------- |
| `format` | `impl Into&lt;String&gt;` |

### `language`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn language(mut self, language: impl Into<String>) -> Self
```

Set the language

**Parameters:**

| Name       | Type                      |
| ---------- | ------------------------- |
| `language` | `impl Into&lt;String&gt;` |

### `timeout`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn timeout(mut self, timeout: u32) -> Self
```

Set the timeout

**Parameters:**

| Name      | Type  |
| --------- | ----- |
| `timeout` | `u32` |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/agents/mod.rs#L35">
  `praisonai/src/agents/mod.rs` at line 35
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Configuration" icon="gear" href="/docs/rust/configuration" />

  <Card title="Rust Installation" icon="download" href="/docs/rust/installation" />

  <Card title="Rust Audio" icon="volume-high" href="/docs/rust/audio" />
</CardGroup>
