AudioTranscriberOptions interface

Options to configure the MediaPipe Audio Transcriber Task.

Signature:

export declare interface AudioTranscriberOptions extends TaskRunnerOptions 

Extends: TaskRunnerOptions

Properties

Property Type Description
cacheDir string | undefined Optional directory path for caching compiled XNNPACK / WebGPU weights in the WASM virtual filesystem. Defaults to '/tmp'.
enableInterimResults boolean | undefined Whether to emit non-final (interim) transcription segments during streaming transcription. Defaults to false.
modelArchitecture ModelArchitecture | number | undefined The ASR model architecture. Defaults to 'AUTO'.
modelAssetSize number | undefined Total byte size of the model asset when streaming via ReadableStreamDefaultReader.
prompt string | undefined Optional prompt / instruction prefix for decoder-based ASR architectures (such as 'TINY_GEMMA').
sampleRateHz number | undefined Sample rate of the input audio in Hz. Defaults to 16000.

AudioTranscriberOptions.cacheDir

Optional directory path for caching compiled XNNPACK / WebGPU weights in the WASM virtual filesystem. Defaults to '/tmp'.

Signature:

cacheDir?: string;

AudioTranscriberOptions.enableInterimResults

Whether to emit non-final (interim) transcription segments during streaming transcription. Defaults to false.

Signature:

enableInterimResults?: boolean;

AudioTranscriberOptions.modelArchitecture

The ASR model architecture. Defaults to 'AUTO'.

Signature:

modelArchitecture?: ModelArchitecture | number;

AudioTranscriberOptions.modelAssetSize

Total byte size of the model asset when streaming via ReadableStreamDefaultReader.

Signature:

modelAssetSize?: number;

AudioTranscriberOptions.prompt

Optional prompt / instruction prefix for decoder-based ASR architectures (such as 'TINY_GEMMA').

Signature:

prompt?: string;

AudioTranscriberOptions.sampleRateHz

Sample rate of the input audio in Hz. Defaults to 16000.

Signature:

sampleRateHz?: number;