v3

OpenAPI 3.1.02026-08-0321138121.5 KB
Live V2

Initiate a new live job

post/v2/live

Query parameters

region'us-west' | 'eu-west'

The region used to process the audio.

Request body

encoding'wav/pcm' | 'wav/alaw' | 'wav/ulaw'

The encoding format of the audio stream. Supported formats:

  • PCM: 8, 16, 24, and 32 bits
  • A-law: 8 bits
  • μ-law: 8 bits

Note: No need to add WAV headers to raw audio as the API supports both formats.

bit_depth8 | 16 | 24 | 32

The bit depth of the audio stream

sample_rate8000 | 16000 | 32000 | 44100 | 48000

The sample rate of the audio stream

channelsinteger

The number of channels of the audio stream

custom_metadataobject

Custom metadata you can attach to this live transcription

model'solaria-1'

The model used to process the audio. "solaria-1" is used by default.

endpointingnumber

The endpointing duration in seconds. Endpointing is the duration of silence which will cause an utterance to be considered as finished

maximum_duration_without_endpointingnumber

The maximum duration in seconds without endpointing. If endpointing is not detected after this duration, current utterance will be considered as finished

callbackboolean

If true, messages will be sent to configured url.

Example request

{
  "custom_metadata": {
    "user": "John Doe"
  },
  "realtime_processing": {
    "custom_vocabulary_config": {
      "vocabulary": [
        "Westeros",
        {
          "value": "Stark"
        },
        {
          "value": "Night's Watch",
          "pronunciations": [
            "Nightz Watch"
          ],
          "intensity": 0.4,
          "language": "en"
        }
      ],
      "default_intensity": 0.5
    },
    "custom_spelling_config": {
      "spelling_dictionary": {
        "Gettleman": [
          "gettleman"
        ],
        "SQL": [
          "Sequel"
        ]
      }
    },
    "translation_config": {
      "target_languages": [
        "en"
      ]
    }
  },
  "callback_config": {
    "url": "https://callback.example"
  }
}

Response

The live job has been initiated

idstring uuid required

Id of the job

created_atstring date-time required

Creation date

urlstring uri required

The websocket url to connect to for sending audio data. The url will contain the temporary token to authenticate the session.

Example response

{
  "id": "45463597-20b7-4af7-b3b3-f5fb778203ab",
  "created_at": "2023-12-28T09:04:17.210Z",
  "url": "wss://api.gladia.io/v2/live?token=4a39145c-2844-4557-8f34-34883f7be7d9"
}