Transcription

Turn a short recording into text. Common uses are transcribing a voicemail reply, checking what a recorded message actually says before a campaign, or indexing call audio.

POST /voice/public/asr/transcribe · scope media:read

curl https://api-v2.dropcowboy.com/voice/public/asr/transcribe \
  -H "x-key: $DROPCOWBOY_KEY" -H "x-secret: $DROPCOWBOY_SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "media_id": "1b7e3c9a-4d2f-4a8b-9e6c-7f2a1d5b3c80" }'
{
  "data": {
    "text": "Hi, this is Jordan returning your call about the appointment.",
    "language": "en"
  },
  "meta": { "request_id": "c2a6e8f4-3b9d-4c1e-8a7f-5d3b1e9c6a24" }
}
Field Notes
media_id An MP3 or WAV in your media library.
ext The extension the media_id file was uploaded with: .wav (default) or .mp3.
url Public URL of a WAV file (PCM 16-bit). sample_url is accepted as an alias.

Send media_id or url.

Audio formats

  • media_id takes any MP3 or WAV you uploaded as media. A few seconds after the upload completes we make a normalized copy (8 kHz mono WAV), and that copy is what gets transcribed. Until it exists, an uploaded WAV is transcribed as is and an uploaded MP3 answers 409. Wait two or three seconds and retry.
  • url must point at a WAV file with PCM 16-bit samples. Any other format answers 400. For MP3 or other formats, upload the file as media and pass media_id instead.

Audio can be up to 10 MB. The call is synchronous, so keep recordings to a few minutes. The request is cut off at the gateway's 29-second limit.

Errors

Status Cause
400 Neither url nor media_id was given, the url audio is not WAV, the audio is larger than 10 MB, or it could not be fetched or transcribed.
402 No funds for speech to text (payment-required).
404 The media_id does not exist or its file was never uploaded.
409 The media_id file is an MP3 still being converted. Retry in a few seconds.
502 Speech to text is temporarily unavailable. Safe to retry.

See Errors and limits.

Code samples

The requests from this page, ready to copy. Set DC_KEY and DC_SECRET to your API key pair first.

Example
curl https://api-v2.dropcowboy.com/voice/public/asr/transcribe \
  -H "x-key: $DROPCOWBOY_KEY" -H "x-secret: $DROPCOWBOY_SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "media_id": "1b7e3c9a-4d2f-4a8b-9e6c-7f2a1d5b3c80" }'