Real-time Transcription
Transcribe a live audio or video stream as it happens, by URL or by pushing over RTMP.
Real-time transcription turns a live audio or video stream into a Trint transcript while it is still playing. You provide a stream for Trint to read, Trint creates a Trint (transcript) document, and the transcript fills in continuously until you stop it. Authenticate every request with Basic Authentication using your API key ID and secret.
There are two ways to feed Trint a stream:
- Pull — you host the stream and give Trint a
streamUrl. Start it with Begin real-time transcription. - Push — Trint hosts an RTMP endpoint and you push media to it. Get the endpoint and key from Create a push stream, then start sending RTMP to it.
Once a transcript is running you can poll its status and stop it when the broadcast ends.
Real-time must be enabled on your account
The push endpoint returns 402 with Realtime not enabled, please speak to your account manager if real-time transcription is not enabled for your account. Contact your account manager to turn it on.
Begin real-time transcription
Start a new real-time transcript from a stream you host. Pass the streamUrl Trint should read, and optionally a title, language and transcriptDelay (how many seconds Trint waits before emitting transcript text). The response contains the _id of the newly created Trint, which you use to check its status.
Begin realtime transcription
https://api.trint.com/transcripts/realtime/Start new Realtime transcript
Body parameters
titlestringoptionalTranscript title
languagestringoptionalTranscription language
streamUrlstringoptionalThis will be your media url
transcriptDelaystringoptionalnumbers 1 - 10
workspaceIdstringoptionalID of the Workspace / Shared Drive in which to create the new Trint (optional)
folderIdstringoptionalID of the Shared Drive Folder in which to create the new Trint (optional)
timezoneOffsetinteger (int32)optionalspecifies the timezone offset from UTC in milliseconds, e.g., 3600000 for UTC+1
metadatastringoptionalMetadata to be included in the callback event
curl --request PUT \ --url 'https://api.trint.com/transcripts/realtime/' \
--header 'Authorization: Basic YOUR_BASE64_KEY_ID_AND_SECRET' \
--header 'Content-Type: application/json' \
--data '{}'Response 200
{
"_id": "<newly created trintId>"
}200200400400Create a push stream
Instead of hosting your own stream, generate a Trint-hosted RTMP endpoint and push media to it. The response gives you a streamUrl (for example rtmp://stream.trint.com/live) and a single-use streamKey to authenticate the push, along with the streamId and trintId for the new transcript.
Create Push Stream
https://api.trint.com/transcripts/realtime/pushGenerate a stream key and stream url for a rtmp fed realtime trint
Body parameters
titlestringoptionalTranscript title
languagestringoptionalTranscription language
transcriptDelaystringoptionalnumbers 2 - 20
workspaceIdstringoptionalID of the Workspace / Shared Drive in which to create the new Trint (optional)
folderIdstringoptionalID of the Shared Drive Folder in which to create the new Trint (optional)
timezoneOffsetinteger (int32)optionalspecifies the timezone offset from UTC in milliseconds, e.g., 3600000 for UTC+1
metadatastringoptionalMetadata to be included in the callback event
curl --request POST \ --url 'https://api.trint.com/transcripts/realtime/push' \
--header 'Authorization: Basic YOUR_BASE64_KEY_ID_AND_SECRET' \
--header 'Content-Type: application/json' \
--data '{}'Response 200
{
"streamId": "<newly created stream id>",
"streamUrl": "rtmp://stream.trint.com/live",
"streamKey": "<single use stream key>",
"title": "trint title",
"trintId": "<newly created trint id>"
}200200400400402(Realtime not enabled, please speak to your account manager)Get real-time status
Poll the current status of a running real-time transcript by its Trint ID. The response reports the processing status, any non-critical warnings (such as failed to generate waveform), any critical errors (such as could not detect media), and the started and expires timestamps in ISO 8601 format.
Get realtime status
https://api.trint.com/transcripts/realtime/{trint-id}Get the current status of a realtime
Path parameters
trint-idstringrequiredid of the realtime trint
curl --request GET \ --url 'https://api.trint.com/transcripts/realtime/:trint-id' \
--header 'Authorization: Basic YOUR_BASE64_KEY_ID_AND_SECRET'Response 200
{
"status": "TRANSCRIBING",
"warnings": [
"failed to generate waveform"
],
"errors": [
"could not detect media"
],
"started": "2021-08-20T15:11:33.331Z",
"expires": "2021-08-20T21:11:33.330Z"
}200200400400403403404404Stop real-time transcription
Stop a running real-time transcript and close the session. Supply both the streamId and trintId that identify the active stream and its transcript. A successful request returns an empty object.
Stop realtime transcription
https://api.trint.com/transcripts/realtime/Stop a running Realtime transcript
Body parameters
streamIdstringoptionaltrintIdstringoptionalcurl --request DELETE \ --url 'https://api.trint.com/transcripts/realtime/' \
--header 'Authorization: Basic YOUR_BASE64_KEY_ID_AND_SECRET' \
--header 'Content-Type: application/json' \
--data '{}'Response 200
{}200200400400