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

# Speech & Audio Applications

> Build transcription, audio understanding, translation, and voice pipelines on one Kyma key.

## Best Model for This

| Task                      | Model                  | Endpoint                        |
| ------------------------- | ---------------------- | ------------------------------- |
| Speech-to-text            | `whisper-v3-turbo`     | `POST /v1/audio/transcriptions` |
| Audio scene understanding | `gemini-3-flash-audio` | `POST /v1/audio/understand`     |
| Live subtitle translation | `gemini-2.5-flash`     | `POST /v1/chat/completions`     |
| Voice output              | `minimax-speech-turbo` | `POST /v1/audio/speech`         |

## Quick Start

```javascript JavaScript theme={null}
import OpenAI from "openai";
import fs from "node:fs";

const client = new OpenAI({
  baseURL: "https://kymaapi.com/v1",
  apiKey: process.env.KYMA_API_KEY,
});

const audio = fs.createReadStream("./sample.wav");

const transcript = await client.audio.transcriptions.create({
  model: "whisper-v3-turbo",
  file: audio,
});

const understanding = await client.chat.completions.create({
  model: "gemini-3-flash-audio",
  messages: [
    { role: "system", content: "Summarize tone, background audio, and key events in one short paragraph." },
    { role: "user", content: transcript.text },
  ],
});

const spoken = await client.audio.speech.create({
  model: "minimax-speech-turbo",
  voice_id: "charlie",
  input: understanding.choices[0].message.content ?? "",
  response_format: "mp3",
});

fs.writeFileSync("./audio-summary.mp3", Buffer.from(await spoken.arrayBuffer()));
```

## Tips

* Keep transcription and downstream text tasks separate so you can cache transcript text and retry cheaply.
* For subtitle or dubbing flows, keep each chunk short (3-10s) to reduce timeline drift.
* Use one stable translation model per session for consistent phrasing.
* Keep speech generation idempotent per segment so retries do not duplicate output.

## Cost Estimate

| Workflow                                   | Typical usage            | Cost                 |
| ------------------------------------------ | ------------------------ | -------------------- |
| 60-minute transcription                    | STT only                 | \~\$0.05             |
| 60-minute transcript + audio scene summary | STT + understand         | \~\$0.06-0.08        |
| 10-minute dub prototype                    | STT + translate + speech | usually under \$0.10 |

Actual cost depends on duration, chunk count, and chosen voice model.

## Built with Kyma

* [sonpiaz/haynoi](https://github.com/sonpiaz/haynoi?utm_source=kyma-docs) is a dictation app that uses `whisper-v3-turbo` for transcription and `gemini-2.5-flash` for cleanup.
* [sonpiaz/watch-cli](https://github.com/sonpiaz/watch-cli?utm_source=kyma-docs) turns social videos into agent-ready assets with `whisper-v3-turbo` for transcript and `gemini-3-flash-audio` for audio scene Q\&A.
* [sonpiaz/kyma-dub](https://github.com/sonpiaz/kyma-dub?utm_source=kyma-docs) dubs videos end-to-end using `whisper-v3-turbo` for ASR and `qwen-3.7-max` as the default translation model.

## Next Steps

* [Realtime Audio](/guides/realtime-audio) - build low-latency voice interactions
* [Streaming](/guides/streaming) - stream partial output to clients
* [Audio Transcriptions API](/api-reference/audio-transcriptions) - endpoint contract and formats
