> ## 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.

# transcribe • AI Agent SDK

> transcribe: Transcribe audio to text.

# transcribe

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**AudioAgent**](../classes/AudioAgent) class in the [**audio\_agent**](../modules/audio_agent) module.

Transcribe audio to text.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def transcribe(file: Union[str, BinaryIO], language: Optional[str], temperature: Optional[float], model: Optional[str]) -> str
```

## Parameters

<ParamField query="file" type="Union" required={true}>
  Path to audio file or file-like object
</ParamField>

<ParamField query="language" type="Optional" required={false}>
  Language code (e.g., "en", "es", "fr")
</ParamField>

<ParamField query="temperature" type="Optional" required={false}>
  Sampling temperature (0.0 to 1.0)
</ParamField>

<ParamField query="model" type="Optional" required={false}>
  Override model for this call \*\*kwargs: Additional provider-specific parameters
</ParamField>

### Returns

<ResponseField name="Returns" type="str">
  Transcribed text
</ResponseField>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
agent = AudioAgent(llm="openai/whisper-1")
    text = agent.transcribe("audio.mp3")
    print(text)
```

## Uses

* `transcription`
* `close`

## Used By

* [`AudioAgent.listen`](../functions/AudioAgent-listen)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/audio_agent.py#L314">
  `praisonaiagents/agent/audio_agent.py` at line 314
</Card>
