The MediaPipe Audio Transcriber task lets you turn speech into text on the device. You can use this task to add live captions, dictation, voice notes, or voice commands to your app. This task operates on audio data with a machine learning (ML) model, either as a complete audio clip or as a continuous stream, and outputs transcript segments with timestamps. While audio is streaming, the task can also return interim results that are refined as more audio arrives.
Get Started
Start using this task by following one of these implementation guides for your target platform. These platform-specific guides walk you through a basic implementation of this task, including a recommended model, and code example with recommended configuration options:
| Platform | Code Example | Guide |
|---|---|---|
| Android | Code example | Guide |
| iOS | Code example | Guide |
Task details
This section describes the capabilities, inputs, outputs, and configuration options of this task.
Features
- Streaming transcription - Pass audio in small chunks, for example from the microphone, and get transcript segments back while the user speaks.
- Audio clip transcription - Transcribe a complete recording in a single call.
- Interim results - Optionally get early, non-final hypotheses for low-latency captions. The task replaces them with final segments as more audio arrives.
- Segment timestamps - Each segment includes its start and end time in the audio.
- Prewarming - Load the model ahead of time to reduce the latency of the first result.
- On-device processing - The task processes audio entirely on the device and doesn't send audio or transcripts off the device.
| Task inputs | Task outputs |
|---|---|
Input is mono PCM audio as float samples in the range [-1.0, 1.0],
provided as one of the following:
|
Audio Transcriber outputs a list of transcript segments containing:
|
Configurations options
This task has the following configuration options:
| Option Name | Description | Value Range | Default Value |
|---|---|---|---|
modelAssetPath |
Absolute path to the speech recognition model file
(.litertlm) on the device. Set this option in the base
options. You can also pass a file
descriptor with setModelAssetFileDescriptor.
In-memory model buffers aren't supported. |
File path | None (required) |
delegate |
Hardware used to run the model. Set this option in the base options. | {Delegate.CPU, Delegate.GPU} |
CPU |
sampleRateHz |
Sample rate of the input audio, in Hz. If the input isn't 16000 Hz, the task resamples it to 16 kHz before transcribing it. | Positive number | 16000 |
enableInterimResults |
Whether to return interim segments while audio is streaming. Interim segments are early hypotheses that can change as more audio arrives. The task later returns a final segment for the same audio. | Boolean | false |
modelArchitecture |
Model family. With the default value, the task detects the model family from the model file. Use the open-weights value for models such as Parakeet. | {ModelArchitecture.AUTO,
ModelArchitecture.OMNI} |
ModelArchitecture.AUTO |
cacheDir |
Writable directory where the task caches compiled model artifacts, so that later starts are faster. | Directory path | Not set |
Models
The Audio Transcriber requires a speech recognition model in the LiteRT-LM
(.litertlm) format. The model isn't included in the MediaPipe Tasks
libraries. Download the model from Hugging Face, store it on the device, and
pass its local path to the task, as shown in the platform guides under
Get Started.
Parakeet TDT 0.6B v3 (recommended)
Parakeet TDT 0.6B v3 is an NVIDIA speech recognition model that transcribes 25 European languages and outputs punctuated, capitalized text.
| Model name | Languages | Quantization type | Size | Versions |
|---|---|---|---|---|
| Parakeet TDT 0.6B v3 | 25 European languages | INT8 | About 615 MB | Latest |
Model license and attribution
NVIDIA publishes Parakeet TDT 0.6B v3 under the Creative Commons Attribution 4.0 (CC-BY-4.0) license. If you distribute an app that uses this model, give appropriate credit to NVIDIA, for example in your app's open source notices.
Task benchmarks
Benchmarks for the recommended model are coming soon.