Audio Formats & Languages
Shisa ASR accepts base64-encoded audio in several common formats and can identify the spoken language automatically. This page lists the supported formats, shows how to encode audio to base64, and covers language selection.
Supported audio formats
Pass raw base64-encoded audio data in the audio field. The server auto-detects the format from the binary header — you do not need to declare the format yourself.
| Format | MIME type | Detection |
|---|---|---|
| WAV | audio/wav | RIFF header |
| OGG | audio/ogg | OggS header |
| MP3 | audio/mpeg | ID3 tag or MPEG sync bytes |
| FLAC | audio/flac | fLaC header |
Encoding audio to base64
Convert any supported file to base64, then embed it directly in your request:
# Encode any supported format to base64
base64 -w0 audio.ogg # Linux
base64 -i audio.ogg # macOS
# Use in a curl request
curl -s -XPOST 'https://api.shisa.ai/asr/srt/audio_llm' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ "audio": "'$(base64 -w0 audio.ogg)'" }'
Language detection (LID)
When you omit the language parameter, the active ASR backend detects the spoken language and returns its code in the response. To skip detection and force a language, set language explicitly (for example "ja" or "en").
Language availability is determined by the selected backend; the router does not publish or validate against a fixed exhaustive language catalogue. Verify any language outside your tested deployment before relying on it in production. Common codes include:
| Code | Language |
|---|---|
ja | Japanese |
en | English |
zh | Chinese |
Next steps
- Make your first transcription in the Quickstart.
- See all request parameters and error codes in the API reference.
- Return to the ASR overview.