AudioTranscriberOptions interface

Options to configure the MediaPipe AudioTranscriber Task on the Web.

Signature:

export declare interface AudioTranscriberOptions extends TaskRunnerOptions 

Properties

Property Modifiers Type Description
sampleRateHz number Input audio sample rate in Hz. Defaults to 16000 Hz when unset or 0.
enableInterimResults boolean Whether to emit interim (non-final) transcription segments during streaming. Defaults to false.
modelArchitecture AudioTranscriberModelArchitecture | number Model architecture backend family ('AUTO', 'OMNI', or 'TINY_GEMMA', or numeric code 0=AUTO, 1=OMNI, 2=TINY_GEMMA). Defaults to 'AUTO'.
prompt string Optional system or user prompt override for generative ASR models.
cacheDir string Optional directory path in the Wasm virtual filesystem for caching compiled model artifacts.
modelAssetSize number Optional byte length of baseOptions.modelAssetBuffer when provided as a ReadableStreamDefaultReader.

AudioTranscriberOptions.sampleRateHz

Input audio sample rate in Hz. Defaults to 16000 Hz when unset or 0.

Signature:

sampleRateHz?: number;

AudioTranscriberOptions.enableInterimResults

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

Signature:

enableInterimResults?: boolean;

AudioTranscriberOptions.modelArchitecture

Model architecture backend family ('AUTO', 'OMNI', or 'TINY_GEMMA', or numeric code 0=AUTO, 1=OMNI, 2=TINY_GEMMA). Defaults to 'AUTO'.

Signature:

modelArchitecture?: AudioTranscriberModelArchitecture | number;

AudioTranscriberOptions.prompt

Optional system or user prompt override for generative ASR models.

Signature:

prompt?: string;

AudioTranscriberOptions.cacheDir

Optional directory path in the Wasm virtual filesystem for caching compiled model artifacts.

Signature:

cacheDir?: string;

AudioTranscriberOptions.modelAssetSize

Optional byte length of baseOptions.modelAssetBuffer when provided as a ReadableStreamDefaultReader.

Signature:

modelAssetSize?: number;