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.
To follow this procedure, you must:
-
Have a valid Agora Account.
-
Have a valid Agora project with an app ID and a temporary token or a token
server. For details, see Agora account management.
-
Have a computer with access to the internet. If your network has a firewall, follow the steps in Firewall requirements.
-
Join an RTC channel as a host and start streaming.
- Make sure Real-Time STT is enabled for your app.
To transcribe a specific host, follow the API call sequence from the REST Quickstart and modify the start
request as follows:
_16curl --location -g 'https://api.agora.io/v1/projects/{{appId}}/rtsc/speech-to-text/tasks?builderToken={{tokenName}}' \
_16--header 'Content-Type: application/json' \
_16 "<YourTranscribeLanguages>"
_16 "channelName": "<YourChannelName>", // The RTC channel name.
_16 "subBotUid": "<YourSubscribeUid>", // The unique UID in the channel for the bot to subscribe to audio. Int UID needs to be filled as a string.
_16 "subBotToken": "<YourSubscribeToken>", // The RTC token for subBot to join the RTC channel. Optional, based on the RTC channel security configuration.
_16 "pubBotUid": "<YourPublishUid>", // The unique UID in the channel for the bot to publish text. Int UID needs to be filled as a string. subBotUid and pubBotUid MUST be different.
_16 "pubBotToken": "<YourPublishToken>", // The RTC token for pubBot to join the RTC channel. Apply the admin token.
_16 "subscribeAudioUids": [uint], // The UIDs of the hosts whose audio needs to be transcribed, max is 3.