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

puthttps://api.trint.com/transcripts/realtime/

Start new Realtime transcript

Body parameters

titlestringoptional

Transcript title

languagestringoptional

Transcription language

streamUrlstringoptional

This will be your media url

transcriptDelaystringoptional

numbers 1 - 10

workspaceIdstringoptional

ID of the Workspace / Shared Drive in which to create the new Trint (optional)

folderIdstringoptional

ID of the Shared Drive Folder in which to create the new Trint (optional)

timezoneOffsetinteger (int32)optional

specifies the timezone offset from UTC in milliseconds, e.g., 3600000 for UTC+1

metadatastringoptional

Metadata to be included in the callback event

PUT /
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

200 response
{
  "_id": "<newly created trintId>"
}
200200
400400

Create 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

posthttps://api.trint.com/transcripts/realtime/push

Generate a stream key and stream url for a rtmp fed realtime trint

Body parameters

titlestringoptional

Transcript title

languagestringoptional

Transcription language

transcriptDelaystringoptional

numbers 2 - 20

workspaceIdstringoptional

ID of the Workspace / Shared Drive in which to create the new Trint (optional)

folderIdstringoptional

ID of the Shared Drive Folder in which to create the new Trint (optional)

timezoneOffsetinteger (int32)optional

specifies the timezone offset from UTC in milliseconds, e.g., 3600000 for UTC+1

metadatastringoptional

Metadata to be included in the callback event

POST /push
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

200 response
{
  "streamId": "<newly created stream id>",
  "streamUrl": "rtmp://stream.trint.com/live",
  "streamKey": "<single use stream key>",
  "title": "trint title",
  "trintId": "<newly created trint id>"
}
200200
400400
402(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

gethttps://api.trint.com/transcripts/realtime/{trint-id}

Get the current status of a realtime

Path parameters

trint-idstringrequired

id of the realtime trint

GET /{trint-id}
curl --request GET \  --url 'https://api.trint.com/transcripts/realtime/:trint-id' \
  --header 'Authorization: Basic YOUR_BASE64_KEY_ID_AND_SECRET'

Response 200

200 response
{
  "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"
}
200200
400400
403403
404404

Stop 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

deletehttps://api.trint.com/transcripts/realtime/

Stop a running Realtime transcript

Body parameters

streamIdstringoptional
trintIdstringoptional
DELETE /
curl --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

200 response
{}
200200
400400