Skip to main content
POST
/
v1alpha
/
speech-to-text:streamTranscribe
Stream audio bytes to receive transcription text
curl --request POST \
  --url https://api.inworld.ai/v1alpha/speech-to-text:streamTranscribe \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "config": {
    "languageCode": "LANGUAGE_CODE_UNSPECIFIED",
    "silenceDurationThresholdMs": "<string>"
  },
  "audio": {
    "content": "aSDinaTvuI8gbWludGxpZnk="
  },
  "endOfStream": {}
}
'
{
  "result": {
    "transcriptionResult": {
      "alternatives": [
        {
          "transcript": "<string>"
        }
      ],
      "languageCode": "<string>",
      "isFinal": true
    },
    "transcriptionResults": [
      {
        "alternatives": [
          {
            "transcript": "<string>"
          }
        ],
        "languageCode": "<string>",
        "isFinal": true
      }
    ]
  },
  "error": {
    "code": 123,
    "message": "<string>",
    "details": [
      {
        "@type": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Should follow the format Basic {credentials}. The {credentials} consists of the Base64-encoded string of the API key and the secret in the format key:secret

Body

application/json

Request for StreamTranscribe method. The payload is a oneof that can contain either the configuration or audio content. (streaming inputs)

Request for StreamTranscribe method. The payload is a oneof that can contain either the configuration or audio content.

config
object

Configuration for the stream transcription.

audio
object

Audio content data.

endOfStream
object

End of stream message.

Response

A successful response.(streaming responses)

result
object

Response for StreamTranscribe method which contains transcription results of the audio stream.

error
object