> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Speech-to-Text

> Transcribe audio files with Agno agents.

Agno agents can transcribe audio files using different tools and models. This page covers OpenAI transcription; see [Audio to Text Transcription](https://agno-v2.mintlify.site/multimodal/agent/usage/audio-to-text.md) for the fully multimodal Gemini approach.

## Using OpenAI Transcription (Cloud)

The following agent uses `OpenAITools` with the `gpt-4o-transcribe` model for audio transcription. `OpenAITools` defaults to `whisper-1` if no `transcription_model` is set.

```python speech_to_text.py theme={null}
from pathlib import Path

from agno.agent import Agent
from agno.tools.openai import OpenAITools
from agno.utils.media import download_file

url = "https://agno-public.s3.amazonaws.com/demo_data/sample_conversation.wav"

local_audio_path = Path("tmp/sample_conversation.wav")
print(f"Downloading file to local path: {local_audio_path}")
download_file(url, local_audio_path)

transcription_agent = Agent(
    tools=[OpenAITools(transcription_model="gpt-4o-transcribe")],
    markdown=True,
)
transcription_agent.print_response(
    f"Transcribe the audio file for this file: {local_audio_path}"
)
```

## Usage

<Snippet file="create-venv-step.mdx" />

**1. Install dependencies**

```bash theme={null}
uv pip install -U openai agno
```

**2. Export your OpenAI API key**

```bash Mac/Linux theme={null}
  export OPENAI_API_KEY="your_openai_api_key_here"
```

```bash Windows theme={null}
  $Env:OPENAI_API_KEY="your_openai_api_key_here"
```

**3. Run Agent**

```bash theme={null}
python speech_to_text.py
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.