Transcribe audio

POST/transcribe

Transcribes an uploaded audio recording and returns the transcript. Send the raw audio bytes as the request body; the audio format is detected automatically (WAV, FLAC, MP3, OGG/WebM Opus).

Supports up to ~5 minutes of audio per request. This limit is on audio duration regardless of file size or format, so a compressed recording within the size limit can still be rejected for being too long. Pair the transcript with a downstream text step (e.g. POST /lang2fhir/create) to turn it into a FHIR resource.

RequiresBearerauthentication

Query parameters

languagestring[]optional

BCP-47 language tag, repeatable for up to 4 candidate languages. Defaults to en-US.

Returns  

Transcription succeeded.

Response fields

transcriptstringrequired

The full transcript of the audio.

POSTRequest
# Get authentication token
PHENOML_TOKEN=$(curl -X POST "https://experiment.app.pheno.ml/v2/auth/token" \
  -u "$PHENOML_CLIENT_ID:$PHENOML_CLIENT_SECRET" \
  | jq -r '.access_token')

curl -X POST "https://experiment.app.pheno.ml/transcribe" \
  -H "Authorization: Bearer $PHENOML_TOKEN" \
  -H "Content-Type: application/json" \
  -d '"example"'
200 OKExample Response
{
  "transcript": "example"
}