Skip to content

getDetectedFormatMimeType

Returns the MIME type for a detected container format.

function getDetectedFormatMimeType(format): string;

Defined in: src/utils/audioFormat.ts:421

Returns the MIME type for a detected container format.

Parameters

ParameterTypeDescription
formatDetectedAudioFormatA format returned by detectAudioFormat.

Returns

string

The corresponding MIME type (e.g. 'audio/wav').

Remarks

Complements getAudioMimeType, which maps the SDK’s AudioFormat type. This function maps the wider DetectedAudioFormat set returned by detectAudioFormat.

Example

getDetectedFormatMimeType('mp3'); // => 'audio/mpeg'
getDetectedFormatMimeType('ogg'); // => 'audio/ogg'

See

detectAudioFormat for obtaining the format

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency