> For the complete documentation index, see [llms.txt](https://docs.cortecs.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cortecs.ai/usage/audio-transcription.md).

# Audio Transcription

**Transcription** converts spoken audio into written text, enabling applications such as speech-to-text, meeting notes, subtitles, and voice analytics. It supports multiple audio formats and languages, making it easy to extract accurate text from audio content.

To get a full list of embedding models visit [cortecs.ai](https://cortecs.ai/serverlessModels) and filter by the **Transcription** tag.

{% tabs %}
{% tab title="Python" %}

```python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.cortecs.ai/v1/audio/transcriptions",
    api_key="<API_KEY>",
)

with open("audio_file.wav", "rb") as audio_file:
    response = client.audio.transcriptions.create(
        file=audio_file,
        model="<MODEL_NAME>"
    )

print(response)
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
import fs from 'fs';

const filepath = 'audio_file.wav';

const formData = new FormData();
formData.append('file', new Blob([fs.readFileSync(filepath)]), 'audio_file.wav');
formData.append('model', '<MODEL_NAME>');

const response = await fetch('https://api.cortecs.ai/v1/audio/transcriptions', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <API_KEY>',
  },
  body: formData,
});

const data = await response.json();
console.log(data);
```

{% endtab %}

{% tab title="Curl" %}

```bash
curl https://api.cortecs.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer <API_KEY>" \
  -F "file=@audio_file.wav" \
  -F "model=<MODEL_NAME>"
```

{% endtab %}
{% endtabs %}

> **Note:**  File format support depends on the provider. Check the model documentation for details.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cortecs.ai/usage/audio-transcription.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
