# Soniox docs Documentation from the [soniox.com/docs](https://soniox.com/docs) website. ## Links to docs content pages: - [Community and support](https://soniox.com/docs/community-and-support) - [Introduction](https://soniox.com/docs/) - [AI engineering](https://soniox.com/docs/stt/ai-engineering) - [Data residency](https://soniox.com/docs/stt/data-residency) - [Get started](https://soniox.com/docs/stt/get-started) - [Models](https://soniox.com/docs/stt/models) - [Security and privacy](https://soniox.com/docs/stt/security-and-privacy) - [Web SDK](https://soniox.com/docs/stt/SDKs/web-sdk) - [API reference](https://soniox.com/docs/stt/api-reference) - [WebSocket API](https://soniox.com/docs/stt/api-reference/websocket-api) - [Async transcription](https://soniox.com/docs/stt/async/async-transcription) - [Async translation](https://soniox.com/docs/stt/async/async-translation) - [Error handling](https://soniox.com/docs/stt/async/error-handling) - [Limits & quotas](https://soniox.com/docs/stt/async/limits-and-quotas) - [Webhooks](https://soniox.com/docs/stt/async/webhooks) - [Confidence scores](https://soniox.com/docs/stt/concepts/confidence-scores) - [Context](https://soniox.com/docs/stt/concepts/context) - [Language hints](https://soniox.com/docs/stt/concepts/language-hints) - [Language identification](https://soniox.com/docs/stt/concepts/language-identification) - [Language restrictions](https://soniox.com/docs/stt/concepts/language-restrictions) - [Speaker diarization](https://soniox.com/docs/stt/concepts/speaker-diarization) - [Supported languages](https://soniox.com/docs/stt/concepts/supported-languages) - [Timestamps](https://soniox.com/docs/stt/concepts/timestamps) - [Soniox Live](https://soniox.com/docs/stt/demo-apps/soniox-live) - [Direct stream](https://soniox.com/docs/stt/guides/direct-stream) - [Proxy stream](https://soniox.com/docs/stt/guides/proxy-stream) - [Community integrations](https://soniox.com/docs/stt/integrations/community-integrations) - [LiveKit](https://soniox.com/docs/stt/integrations/livekit) - [Pipecat](https://soniox.com/docs/stt/integrations/pipecat) - [Twilio](https://soniox.com/docs/stt/integrations/twilio) - [Vercel AI SDK](https://soniox.com/docs/stt/integrations/vercel-ai-sdk) - [Connection keepalive](https://soniox.com/docs/stt/rt/connection-keepalive) - [Endpoint detection](https://soniox.com/docs/stt/rt/endpoint-detection) - [Error handling](https://soniox.com/docs/stt/rt/error-handling) - [Limits & quotas](https://soniox.com/docs/stt/rt/limits-and-quotas) - [Manual finalization](https://soniox.com/docs/stt/rt/manual-finalization) - [Real-time transcription](https://soniox.com/docs/stt/rt/real-time-transcription) - [Real-time translation](https://soniox.com/docs/stt/rt/real-time-translation) - [Create temporary API key](https://soniox.com/docs/stt/api-reference/auth/create_temporary_api_key) - [Get models](https://soniox.com/docs/stt/api-reference/models/get_models) - [Delete file](https://soniox.com/docs/stt/api-reference/files/delete_file) - [Get file](https://soniox.com/docs/stt/api-reference/files/get_file) - [Get file URL](https://soniox.com/docs/stt/api-reference/files/get_file_url) - [Get files](https://soniox.com/docs/stt/api-reference/files/get_files) - [Upload file](https://soniox.com/docs/stt/api-reference/files/upload_file) - [Create transcription](https://soniox.com/docs/stt/api-reference/transcriptions/create_transcription) - [Delete transcription](https://soniox.com/docs/stt/api-reference/transcriptions/delete_transcription) - [Get transcription](https://soniox.com/docs/stt/api-reference/transcriptions/get_transcription) - [Get transcription transcript](https://soniox.com/docs/stt/api-reference/transcriptions/get_transcription_transcript) - [Get transcriptions](https://soniox.com/docs/stt/api-reference/transcriptions/get_transcriptions) # Community and support URL: /community-and-support Engage with our community to explore new updates, participate in discussions, contribute to our projects, and report any issues you encounter. *** title: Community and support description: Engage with our community to explore new updates, participate in discussions, contribute to our projects, and report any issues you encounter. keywords: "soniox community, soniox discord, soniox support" ------------------------------------------------------------ import { LinkCard } from "@/components/link-card"; import { GitHubIcon } from "@/components/github-icon"; ## Github We use GitHub to track issues related to Soniox products. Check our [Soniox GitHub](https://github.com/soniox) profile for all available code. *** ## Discord For questions, suggestions, or feedback about our products, we invite you to join the [Soniox Discord](https://discord.gg/rWfnk9uM5j). We are super fast in responding to issues and requests. You should receive a response within 24 hours. We encourage other developers to contribute and engage in raised questions. *** ## Website For more information about our products, pricing or Soniox in general, visit out [website](https://soniox.com/). # Introduction URL: / Soniox provides powerful, production-ready APIs for transcribing, translating, and understanding audio content. *** title: Introduction description: Soniox provides powerful, production-ready APIs for transcribing, translating, and understanding audio content. keywords: "soniox speech-to-text API, stt, speech ai api, speech recognition api" --------------------------------------------------------------------------------- import { LinkCards, SpeechToTextIcon } from "@/components/link-card"; import { Step, Steps } from "fumadocs-ui/components/steps"; ## Get started with Soniox APIs Welcome to Soniox — the fastest, most accurate platform for audio and speech intelligence. Soniox provides powerful, production-ready APIs for transcribing, translating, and understanding audio content. Whether you are building real-time voice interfaces, analyzing large volumes of audio, or extracting structured insights from speech, Soniox gives you the tools to do it efficiently and at scale. You can integrate Soniox into your product, workflow, or pipeline using simple REST or WebSocket APIs, with support for multiple SDKs and real-time streaming. ## Products , description: "Transcribe and translate speech in 60+ languages with world-leading accuracy and real-time performance. Supports file and real-time modes, high-quality translation with super-low latency, speaker diarization, and advanced customization.", arrowInSeparateLine: true, titleSize: "text-xl", }, ]} /> ## Before you begin To start using Soniox, create a [Soniox account](https://console.soniox.com/signup/). Visit the [Soniox Console](https://console.soniox.com/) to generate and manage API keys, view usage, logs, and billing. Soniox Console is your self-service control center for everything Soniox. # AI engineering URL: /stt/ai-engineering Using MCP, AI assistant, and LLMs with Soniox for AI-powered development *** title: AI engineering description: Using MCP, AI assistant, and LLMs with Soniox for AI-powered development keywords: "soniox AI, MCP, AI coding, llms, AI assistant" --------------------------------------------------------- import Image from "next/image"; Soniox provides easy-to-use AI tools that help you explore documentation, generate code, and get guidance, even if you're new to programming. These tools work directly with your coding environment, so you can focus on building instead of searching for answers. With Soniox AI engineering, you can: * Browse documentation via the **MCP server** without leaving your coding tools * Ask the **AI assistant** for explanations, examples, or code help * Use **LLM context files** so AI models understand Soniox APIs and examples * Copy page content or open it directly in your preferred AI tool These features reduce friction, help you learn faster, and make working with Soniox APIs simple and efficient. *** ## MCP server The **MCP server** lets you access Soniox documentation right from tools like Cursor, Windsurf, or Claude Code. You can search guides, view examples, and explore APIs without switching windows. ### How to set it up Add the following configuration to your coding tool: ```json "soniox-docs": { "command": "npx", "args": [ "-y", "mcp-remote", "https://soniox.com/docs/api/mcp/mcp" ] } ```
[![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/en/install-mcp?name=soniox-docs\&config=eyJjb21tYW5kIjoibnB4IC15IG1jcC1yZW1vdGUgaHR0cHM6Ly9zb25pb3guY29tL2RvY3MvYXBpL21jcC9tY3AifQ%3D%3D)
[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=soniox-docs\&config=eyJjb21tYW5kIjoibnB4IC15IG1jcC1yZW1vdGUgaHR0cHM6Ly9zb25pb3guY29tL2RvY3MvYXBpL21jcC9tY3AifQ%3D%3D)
Follow your tool's instructions for adding a remote server. Once set up, you can quickly explore Soniox docs and code samples from within your coding environment. *** ## AI assistant The **Soniox AI assistant** is available directly from the docs. It can: * Answer questions about Soniox APIs * Explain example code or suggest modifications * Provide guidance in context, so you don't need to guess Even if you're new to programming, the AI assistant can help you understand code and API workflows quickly. *** ## LLM context files Soniox provides two files that give AI models context about our APIs and examples: * [llms.txt](/llms.txt) – core context for general tasks * [llms-full.txt](/llms-full.txt) – extended context for advanced workflows Adding these files to your AI tool ensures the model can provide accurate, context-aware help. *** ## Copy and open buttons Copy button At the top of each documentation page, the **Copy page** button makes it easy to bring content into your workflow: * **Copy Markdown** – copy the full page content instantly * **Open in ChatGPT or Claude** – send the page context for live AI interaction These features help you experiment and learn by bringing examples and documentation directly into your coding environment. *** For more information about Soniox products, pricing, or general resources, visit our [website](https://soniox.com/). # Data residency URL: /stt/data-residency Learn about data residency. *** title: Data residency description: Learn about data residency. ---------------------------------------- Soniox keeps your data yours. Any content you send to the Soniox API — audio, transcripts, or metadata — is **never used to train or improve our models.** For more information, see our [Security and privacy](/stt/security-and-privacy). *** ## What is data residency Data residency lets you choose **where** Soniox processes and stores your content. When you select a region for a project, **all audio and transcript data for that project stays in that region** — for both processing and storage. To get access to regional deployments, contact us: [sales@soniox.com](mailto:sales@soniox.com). *** ## How data residency works When data residency is enabled for your account: * You choose a **region** when creating a new project. * Any API requests made using that project's API key are handled **fully within the selected region.** * All **content data** (audio + transcripts) remains within that region for processing and storage. ### System data Data residency **does not apply to system data** such as account and project metadata, usage statistics, and billing data. This system data may be processed outside the selected region. **Your content (audio + transcripts) never leaves the region you choose.** *** ## Using data residency Data residency is set **per project** within your Soniox organization. ### 1. Create a project with a region When creating a new project: * Select the region from the **region** dropdown. * Each project receives region-specific API keys. ### 2. Use the region-specific API domain To ensure processing stays in the region, use: * The **API key** from the regional project. * The **correct API domain** for that region (see below). *** ## Regional endpoints | Region | Regional storage | Regional processing | Capabilities | API domain | | ------------------ | ---------------- | ------------------- | ------------------ | ------------------------------------------------- | | **United States** | ✅ Yes | ✅ Yes | Full API supported | `api.soniox.com`
`stt-rt.soniox.com` | | **European Union** | ✅ Yes | ✅ Yes | Full API supported | `api.eu.soniox.com`
`stt-rt.eu.soniox.com` | | **Japan** | ✅ Yes | ✅ Yes | Full API supported | `api.jp.soniox.com`
`stt-rt.jp.soniox.com` | If you'd like help enabling data residency or need a custom region, reach out: [sales@soniox.com](mailto:sales@soniox.com). # Get started URL: /stt/get-started Learn how to use Soniox Speech-to-Text API. *** title: Get started description: Learn how to use Soniox Speech-to-Text API. keywords: "get started with speech to text, speech to text api, speach recognition api" --------------------------------------------------------------------------------------- ## Learn how to use Soniox API in minutes Soniox Speech-to-Text is a **universal speech AI** that lets you transcribe and translate speech in 60+ languages — from recorded files (async) or live audio streams (real-time). Languages can be freely mixed within the same conversation, and Soniox will handle them seamlessly with high accuracy and low latency. In just a few steps, you can run your first transcription or translation. The examples also cover advanced features such as speaker diarization, real-time translation, context customization, and automatic language identification — all through the same simple API. ### Get API key Create a [Soniox account](https://console.soniox.com/signup) and log in to the [Console](https://console.soniox.com) to get your API key. API keys are created per project. In the Console, go to **My First Project** and click **API Keys** to generate one. Export it as an environment variable (replace with your key): ```sh title="Terminal" export SONIOX_API_KEY= ``` ### Get examples Clone the official examples repo: ```sh title="Terminal" git clone https://github.com/soniox/soniox_examples cd soniox_examples/speech_to_text ``` ### Run examples Choose your language and run the ready-to-use examples below. {/* TABLE START */} {/* NOTE: Width is set so that we have maximum of 2 lines in 'Example' column. */} {/* NOTE: Font size is set so the table doesn't look "too big". */}
|
Example
| What it does | Output | | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | | **Real-time
transcription** | Transcribes speech in any language in
real-time. | Transcript streamed to console. | | **Real-time
one-way translation** | Transcribes speech in any language and translates it into Spanish in real-time. | Transcript + Spanish translation streamed together. | | **Real-time
two-way translation** | Transcribes speech in any language and translates English ↔ Spanish in real-time. Spanish → English, English → Spanish. | Transcript + bidirectional translations streamed together. | | **Transcribe file from URL** | Transcribes an audio file directly from a public URL. | Transcript printed to console. | | **Transcribe local file** | Uploads and transcribes an audio file from your computer. | Transcript printed to console. |
{/* TABLE END */} {/* NOTE: Empty tag is needed so code block renders correctly */}
```sh title="Terminal" cd python # Set up environment python3 -m venv venv source venv/bin/activate pip install -r requirements.txt # Real-time examples python soniox_realtime.py --audio_path ../assets/coffee_shop.mp3 python soniox_realtime.py --audio_path ../assets/coffee_shop.mp3 --translation one_way python soniox_realtime.py --audio_path ../assets/two_way_translation.mp3 --translation two_way # Async examples python soniox_async.py --audio_url "https://soniox.com/media/examples/coffee_shop.mp3" python soniox_async.py --audio_path ../assets/coffee_shop.mp3 ``` {/* NOTE: Empty tag is needed so code block renders correctly */}
```sh title="Terminal" cd nodejs # Install dependencies npm install # Real-time examples node soniox_realtime.js --audio_path ../assets/coffee_shop.mp3 node soniox_realtime.js --audio_path ../assets/coffee_shop.mp3 --translation one_way node soniox_realtime.js --audio_path ../assets/two_way_translation.mp3 --translation two_way # Async examples node soniox_async.js --audio_url "https://soniox.com/media/examples/coffee_shop.mp3" node soniox_async.js --audio_path ../assets/coffee_shop.mp3 ``` ## Next steps * **Dive into the [Real-time API](/stt/rt/real-time-transcription)** → Run live transcription, translations, and endpoint detection. * **Explore the [Async API](/stt/async/async-transcription)** → Transcribe and translate (recorded) files at scale and integrate with webhooks. # Models URL: /stt/models Learn about latest models, changelog, and deprecations. *** title: Models description: Learn about latest models, changelog, and deprecations. -------------------------------------------------------------------- Soniox Speech-to-Text **AI** provides multiple models for real-time and asynchronous transcription and translation. This page lists the currently available models, their capabilities, and important updates. *** ## Current models {/*TABLE START */} {/* NOTE: Width is set so that we have maximum of 2 lines in 'Example' column. */} {/* NOTE: Font size is set so the table doesn't look "too big".*/}
|
Model
| {" "}
Type
| Status | | -------------------------------------------- | ----------------------------------------------- | ---------- | | **stt-rt-v3** | Real-time | **Active** | | **stt-async-v3** | Async | **Active** |
{/* TABLE END */} *** ## Aliases Aliases provide a stable reference so you don’t need to change your code when newer versions are released. | Alias | Points to | Notes | | ------------------------ | -------------- | -------------------------------------------------- | | **stt-rt-v3-preview** | `stt-rt-v3` | Always points to the latest real-time active model | | **stt-rt-preview-v2** | `stt-rt-v3` | | | **stt-async-preview-v1** | `stt-async-v3` | | *** ## Changelog ### October 31, 2025 #### Model retirement and upgrade We have accelerated the retirement of older models following the overwhelmingly positive response to the new v3 models. The following models have been retired: * stt-async-preview-v1 * stt-rt-preview-v2 Both models have been **aliased to the new Soniox v3 models.** This means all existing requests using the old model names are now automatically served with v3, giving every user our most accurate, capable, and intelligent voice AI experience, without any code changes required. #### Context compatibility The context feature is now backward compatible with v3 models, ensuring smooth migration from older versions. However, we **strongly recommend updating to the new context** structure for best results and future flexibility. Learn more about [context](/stt/concepts/context). ### October 29, 2025 **Model update:** v3 enhancements **Applies to:** stt-rt-v3, stt-async-v3 #### New features * **Extended audio duration support:** both real-time (stt-rt-v3) and asynchronous (stt-async-v3) models now support **audio up to 5 hours** in a single request. #### Quality improvements * **Higher transcription accuracy** across challenging audio conditions and diverse languages. #### Notes * No API changes are required; existing integrations continue to work seamlessly. * For asynchronous processing, large files up to 5 hours can now be uploaded directly without chunking. * For real-time streaming, sessions up to 5 hours are supported under the same WebSocket connection. ### October 21, 2025 **New models:** stt-rt-v3, stt-async-v3 **Replaces:** stt-rt-preview-v2, stt-async-preview-v1 #### Overview The **v3 models** introduce major improvements across recognition, translation, and reasoning — making Soniox faster, more accurate, and more capable than ever before. These models power real-time and asynchronous speech processing in 60+ languages, with enhanced accuracy, robustness, and context understanding. #### Key improvements * Higher transcription accuracy across 60+ languages * Improved multilingual switching — seamless recognition when speakers change language mid-sentence * Significantly higher translation quality, especially for languages such as German and Korean * The async model now also supports translation * Support for new advanced structured context, enabling richer domain- and task-specific adaptation * Enhanced alphanumeric accuracy (addresses, IDs, codes, serials) * More accurate speaker diarization, even in overlapping speech * Extended maximum audio duration to 5 hours for both async and real-time models #### API compatibility * The v3 models are fully compatible with the existing Soniox API, if you are not using the context feature. * To upgrade, simply replace the model name in your API request: * `{ "model": "stt-rt-v3" }` for real-time * `{ "model": "stt-async-v3" }` for async * If you are using the context feature, update to the new structured [context](/stt/concepts/context) for improved accuracy. #### Deprecation notice The following preview models are **deprecated** and will be retired on **November 30, 2025:** * stt-async-preview-v1 * stt-rt-preview-v2 Please migrate to the v3 models before that date to ensure uninterrupted service. ### August 15, 2025 * Deprecated `stt-rt-preview-v1` ### August 5, 2025 * Released `stt-rt-preview-v2` * Higher transcription accuracy * Improved translation quality * Expanded to support all translation pairs * More reliable automatic language switching * **Replaces:** stt-rt-preview-v2, stt-async-preview-v1 # Security and privacy URL: /stt/security-and-privacy Learn about security and privacy policies. *** title: Security and privacy description: Learn about security and privacy policies. ------------------------------------------------------- At Soniox, we take security and privacy seriously. Our platform is designed to keep your data protected while reducing compliance burdens for your business. This page outlines how Soniox handles data, meets compliance requirements, and ensures secure communication. *** ## Compliance Soniox meets industry-leading certification standards: * **SOC 2 Type 2** – ongoing, independent audits of our security, availability, and confidentiality controls. * **GDPR** – fully compliant with the EU General Data Protection Regulation. * **HIPAA** – certified to support healthcare applications that require protection of PHI (Protected Health Information). To request compliance documentation (SOC 2 report, GDPR, HIPAA), contact us at [support@soniox.com](mailto:support@soniox.com). *** ## Data handling * **No model training** – your audio and transcripts are never used to improve Soniox models or services. * **No retention** – Soniox does not store your audio or transcript data unless explicitly requested through a service that supports storage, i.e. async API. * **Storage** – when you choose to store data, it is securely isolated within your Soniox Account. * **Data deletion** – you can delete all stored audio and transcripts at any time via the Soniox Console or API. *** ## Logging * Minimal logging is performed for service reliability, debugging, and billing. * Logs **never** contain raw audio or transcript content. * Diagnostic metadata (such as request IDs or error traces) may be retained temporarily for operational purposes. *** ## Encryption & security * **In transit** – all communication between your application and Soniox services is encrypted using **TLS 1.2+**. * **Access control** – stored data is restricted to your account namespace, accessible only by your API keys. # Web SDK URL: /stt/SDKs/web-sdk Soniox speech-to-text-web is the official JavaScript/TypeScript SDK for using the Soniox Real-Time API directly in the browser. *** title: Web SDK description: Soniox speech-to-text-web is the official JavaScript/TypeScript SDK for using the Soniox Real-Time API directly in the browser. keywords: "soniox web library, speech to text web lib, speech to text javascript, soniox sdk" --------------------------------------------------------------------------------------------- import { LinkCards } from "@/components/link-card"; ## Overview Soniox [speech-to-text-web](https://github.com/soniox/speech-to-text-web) is the official JavaScript/TypeScript SDK for using the Soniox [Real-time API](/stt/api-reference/websocket-api) directly in the browser. It lets you: * Capture audio from the user's microphone * Stream audio to Soniox in real time * Receive transcription and translation results instantly Enable advanced features such as [language identification](/stt/concepts/language-identification), [speaker diarization](/stt/concepts/speaker-diarization), [context](/stt/concepts/context), [endpoint detection](/stt/rt/endpoint-detection), and more. 👉 Use cases: live captions, multilingual meetings, dictation tools, accessibility overlays, customer support dashboards, education apps. *** ## Installation Install via your preferred package manager: ```bash tab npm install @soniox/speech-to-text-web ``` ```bash tab yarn add @soniox/speech-to-text-web ``` ```bash tab pnpm add @soniox/speech-to-text-web ``` Or use the module directly from a CDN: ```html ``` *** ## Quickstart Use `SonioxClient` to start session: ```ts const sonioxClient = new SonioxClient({ // Your Soniox API key or temporary API key. apiKey: '', }); sonioxClient.start({ // Select the model to use. model: 'stt-rt-preview', // Set language hints when possible to significantly improve accuracy. languageHints: ['en', 'es'], // Context is a string that can include words, phrases, or sentences to improve the // recognition of rare or specific terms. context: 'Celebrex, Zyrtec, Xanax, Prilosec, Amoxicillin', // Enable speaker diarization. Each token will include a "speaker" field. enableSpeakerDiarization: true, // Enable language identification. Each token will include a "language" field. enableLanguageIdentification: true, // Use endpoint detection to detect when a speaker has finished talking. // It finalizes all non-final tokens right away, minimizing latency. enableEndpointDetection: true, // Callbacks when the transcription starts, finishes, or encounters an error. onError: (status, message) => { console.error(status, message); }, // Callback when the transcription returns partial results (tokens). onPartialResult(result) { console.log('partial result', result.tokens); }, }); ``` The `SonioxClient` object processes audio from the user's microphone or a custom audio stream. It returns results by invoking the `onPartialResult` callback with transcription and translation data, depending on the configuration. Stop or cancel transcription: ```ts sonioxClient.stop(); // or sonioxClient.cancel(); ``` ### Translation To enable [real-time translation](/stt/rt/real-time-translation), you can add a `TranslationConfig` object to the parameters of the `start` method. ```ts // One-way translation: translate all spoken languages into a single target language. translation: { type: 'one_way', target_language: 'en', } // Two-way translation: translate back and forth between two specified languages. translation: { type: 'two_way', language_a: 'en', language_b: 'es', } ``` ### `stop()` vs `cancel()` The key difference is that `stop()` gracefully waits for the server to process all buffered audio and send back final results. In contrast, `cancel()` terminates the session immediately without waiting. For example, when a user clicks a "Stop Recording" button, you should call `stop()`. If you need to discard the session immediately (e.g., when a component unmounts in a web framework), call `cancel()`. ### Buffering and temporary API keys If you want to avoid exposing your API key to the client, you can use temporary API keys. To generate a temporary API key, you can use [temporary API key endpoint](/stt/api-reference/auth/create_temporary_api_key) in the Soniox API. If you want to fetch a temporary API key only when recording starts, you can pass a function to the `apiKey` option. The function will be called when the recording starts and should return the API key. ```ts const sonioxClient = new SonioxClient({ apiKey: async () => { // Call your backend to generate a temporary API key there. const response = await fetch('/api/get-temporary-api-key', { method: 'POST', }); const { apiKey } = await response.json(); return apiKey; }, }); ``` Until this function resolves and returns an API key, audio data is buffered in memory. When the temporary API key is fetched, the buffered audio data will be sent to the server and the processing will start. For a full example with temporary API key generation, check the [NextJS Example](https://github.com/soniox/speech-to-text-web/tree/master/examples/nextjs). ### Custom audio streams To transcribe audio from a custom source, you can pass a custom `MediaStream` to the `stream` option. If you provide a custom `MediaStream` to the `stream` option, you are responsible for managing its lifecycle, including starting and stopping the stream. For instance, when using an HTML5 `