Placeholders
The snippets below use these placeholders. Replace them before running the code.| Placeholder | Replace with |
|---|---|
SLNG_API_KEY | An SLNG key from app.slng.ai/api-keys |
Basic File Transcription
Upload an audio file (MP3, WAV, FLAC, OGG, M4A, or WebM) and get back the transcribed text. Here is a sample file you can use:Going further
You can pass additional form fields to customize the transcription:- Language: If you know the language, pass
language=en(ores,fr, etc.). Not all models auto-detect, so setting this explicitly can improve accuracy. - Diarization: Pass
diarize=trueto identify different speakers in a multi-speaker recording. The response will include aspeakerfield on each word. PLease check the models documentation for specific diarization config. - Punctuation: Pass
punctuate=trueto add punctuation to the transcript automatically.
Next Steps
Live STT demo
Try real-time speech recognition in your browser, no setup needed
STT WebSocket examples
Real-time transcription as users speak
Speech-to-Text models
Browse all STT models and endpoints
STT API reference
Endpoint-specific parameters