Skip to main content

Transcribe specified hosts

Real-Time STT supports 2 transcription modes:

  • Channel-based transcription for all active hosts in a channel. To enable it, see REST Quickstart.
  • Transcription of the specified hosts audio only and ignoring all other hosts.

This page explains how to implement transcription of specified hosts only.

Prerequisites

To follow this procedure, you must:

  • Make sure Real-Time STT is enabled for your app.

Implementation

To transcribe a specific host, follow the API call sequence from the REST Quickstart and modify the start request to add the subscribeAudioUids parameter as follows:


_18
curl --location --request POST 'https://api.agora.io/api/speech-to-text/v1/projects/{appId}/join' \
_18
--header 'Content-Type: application/json' \
_18
--header 'Authorization: Basic <credentials>' \
_18
--data '{
_18
"name": "unique-agent-id",
_18
"languages": [
_18
"en-US"
_18
],
_18
"maxIdleTime": 50,
_18
"rtcConfig": {
_18
"channelName": "<YourChannelName>",
_18
"subBotUid": "<YourSubscribeUid>",
_18
"subBotToken": "<YourSubscribeToken>",
_18
"pubBotUid": "<YourPublishUid>",
_18
"pubBotToken": "<YourPublishToken>",
_18
"subscribeAudioUids": ["123", "456"]
_18
}
_18
}'

Alternatively, you can specify the user IDs for the audio streams you do not want to subscribe in the unSubscribeAudioUids parameter. You can set either subscribeAudioUids or unSubscribeAudioUids.