CaptionsCommon interface
Data structure for CaptionsCommon object
Properties
active |
Indicates the current active spoken language in the call in BCP 47 format |
is |
Indicates if captions are active in the current call |
kind | Indicates the Captions type for the active captions object |
supported |
List of supported spoken languages to use with the caption service in BCP 47 format |
Methods
set |
Updates the language of the ongoing Transcription / Captions |
start |
Starts the processing of captions in this call with the provided handler for this client |
stop |
Stops the retrieval of captions data in the call for the user who initiated stopCaptions |
Property Details
activeSpokenLanguage
Indicates the current active spoken language in the call in BCP 47 format
activeSpokenLanguage: string
Property Value
string
isCaptionsFeatureActive
Indicates if captions are active in the current call
isCaptionsFeatureActive: boolean
Property Value
boolean
kind
Indicates the Captions type for the active captions object
kind: CaptionsKind
Property Value
supportedSpokenLanguages
List of supported spoken languages to use with the caption service in BCP 47 format
supportedSpokenLanguages: string[]
Property Value
string[]
Method Details
setSpokenLanguage(string)
Updates the language of the ongoing Transcription / Captions
function setSpokenLanguage(language: string): Promise<void>
Parameters
- language
-
string
The language to caption speech as. Must be BCP 47 format (e.g. "en-us")
Returns
Promise<void>
A Promise representing the completion of the Set Language operation. The completion of this promise does NOT indicate the language has changed. A 'SpokenLanguageChanged' event will be emitted when the language has actually successfully changed.
startCaptions(StartCaptionsOptions)
Starts the processing of captions in this call with the provided handler for this client
function startCaptions(startCaptionsOptions?: StartCaptionsOptions): Promise<void>
Parameters
- startCaptionsOptions
- StartCaptionsOptions
Additional options for starting captions.
Returns
Promise<void>
A Promise representing the completion of the intialization process for the Start Caption operation The completion of this promise does NOT indicate the captions have started. A 'CaptionsActiveChanged' event will be emitted when captions have actually successfully started.
stopCaptions()
Stops the retrieval of captions data in the call for the user who initiated stopCaptions
function stopCaptions(): Promise<void>
Returns
Promise<void>
A promise representing the completion of the Stop Caption operation The completion of this promise does NOT indicate the captions bot has left the call. The participant will unsubscribe from receiving captions data upon successfully stopped.