Skip to content

getAudioMimeType

Returns the MIME type string corresponding to an AudioFormat.

function getAudioMimeType(format): string;

Defined in: src/utils/audio.ts:215

Returns the MIME type string corresponding to an AudioFormat.

Parameters

ParameterTypeDescription
formatAudioFormatThe audio format to look up.

Returns

string

The MIME type string (e.g., 'audio/mpeg' for mp3), or 'application/octet-stream' if the format is not recognized.

Example

getAudioMimeType('mp3');  // 'audio/mpeg'
getAudioMimeType('wav');  // 'audio/wav'
getAudioMimeType('opus'); // 'audio/opus'

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency