Skip to main content
You need an SLNG API key. These examples use the Deepgram Nova model; see Choosing a Model for other available models and endpoints.

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:
curl https://api.slng.ai/v1/stt/slng/deepgram/nova:3 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "audio=@micro-machines.wav"
You should get a response like this:
{
  "metadata": {
    "request_id": "e5fed572-6eac-4b70-81f3-21ba1641dd12",
    "duration": 29.888374,
    "channels": 1,
    "model_info": {
      "1abfe86b-e047-4eed-858a-35e5625b41ee": {
        "name": "2-general-nova",
        "version": "2024-01-06.5664",
        "arch": "nova-2"
      }
    }
  },
  "results": {
    "channels": [
      {
        "alternatives": [
          {
            "transcript": "is the micro machine man presenting the most midget miniature motocator of micro machine...",
            "confidence": 0.9823751,
            "words": [
              { "word": "is", "start": 0.16, "end": 0.32, "confidence": 0.998 },
              { "word": "the", "start": 0.32, "end": 0.40, "confidence": 0.613 },
              { "word": "micro", "start": 0.40, "end": 0.64, "confidence": 0.727 },
              ...
            ]
          }
        ]
      }
    ]
  }
}

Going Further

You can pass additional form fields to customize the transcription:
  • Language — If you know the language, pass language=en (or es, fr, etc.). Not all models auto-detect, so setting this explicitly can improve accuracy.
  • Diarization — Pass diarize=true to identify different speakers in a multi-speaker recording. The response will include a speaker field on each word. Available on Deepgram Nova.
  • Punctuation — Pass punctuate=true to add punctuation to the transcript automatically.
For the full parameter list per model, see the Speech-to-Text API reference.

Next Steps