> ## 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 Agent • Rust AI Agent SDK

> AudioAgent: A specialized agent for audio processing using AI models. Provides Text-to-Speech (TTS) and Speech-to-Text (STT) capabilities.

# AudioAgent

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

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

A specialized agent for audio processing using AI models. Provides Text-to-Speech (TTS) and Speech-to-Text (STT) capabilities.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph LR
    input["Input Data"] --> agent["Agent: AudioAgent"]
    agent --> output["Output Result"]
    style agent fill:#8B0000,color:#fff
    style input fill:#8B0000,color:#fff
    style output fill:#8B0000,color:#fff
```

## Fields

| Name      | Type          | Description                                          |
| --------- | ------------- | ---------------------------------------------------- |
| `name`    | `String`      | Agent name                                           |
| `model`   | `String`      | LLM model (e.g., "openai/tts-1", "openai/whisper-1") |
| `config`  | `AudioConfig` | Audio configuration                                  |
| `verbose` | `bool`        | Verbose output                                       |

## Methods

### `new`

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

Create a new AudioAgent builder

### `name`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn name(&self) -> &str
```

Get agent name

### `model`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn model(&self) -> &str
```

Get model

### `speech`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn speech(&self, text: &str, output_path: &str) -> Result<String>
```

Generate speech from text (placeholder - requires LLM integration)

**Parameters:**

| Name          | Type   |
| ------------- | ------ |
| `text`        | `&str` |
| `output_path` | `&str` |

### `transcribe`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn transcribe(&self, audio_path: &str) -> Result<String>
```

Transcribe audio to text (placeholder - requires LLM integration)

**Parameters:**

| Name         | Type   |
| ------------ | ------ |
| `audio_path` | `&str` |

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Agent" icon="robot" href="/docs/rust/agent" />

  <Card title="Rust Overview" icon="book-open" href="/docs/rust/overview" />

  <Card title="Rust Quickstart" icon="rocket" href="/docs/rust/quickstart" />

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

  <Card title="Rust Autonomy" icon="wand-magic-sparkles" href="/docs/rust/autonomy" />
</CardGroup>
