Skip to main content

You are viewing Agora Docs forBetaproducts and features. Switch to Docs

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 as follows:


_16
curl --location -g 'https://api.agora.io/v1/projects/{{appId}}/rtsc/speech-to-text/tasks?builderToken={{tokenName}}' \
_16
--header 'Content-Type: application/json' \
_16
--data '{
_16
{{
_16
"languages": [
_16
"<YourTranscribeLanguages>"
_16
],
_16
"maxIdleTime": 50,
_16
"rtcConfig": {
_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.
_16
},

vundefined