Book with WebSocket
After you are authenticated you can start booking transcriptions and translation sessions in advance!
Let's look at an example of how to book an order where you can stream the audio through RTMP and get the transcription with WebSocket.
Create an order with this payload:
{
"name": "My WS order",
"client_transaction_id": "{{$guid}}", // The internal id you will use for your order. Has to be unique.
"input": {
"language": "en-US",
"glossary": [
"hero", "test"
],
"schedule": {
"start_at": "{{startAt}}", // start time
"max_duration": 600
},
"type": "websocket"
},
"output": [
{
"product": {
"type": "captions",
"target_languages": ["en-US"],
"tier": "automatic"
}
}
]
}
In the response you will get the websocket address to connect to:
{
"order": {
"id": "8ab69024-09f3-43ac-8d0b-6e290358fa43",
"input": {
"type": "websocket",
"connection_params": {
"url": "wss://speech-staging.verbit.co/ws?token=eyJ0eXAiOiJK123"
}
...
}, ...
}
}
You can learn more on how to read the transcript from the websocket here.
Updated 4 months ago