Captions interface
Data structure for Captions object
- Extends
Inherited 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
off("Captions |
Unsubscribe function for any of the CaptionsPropertyChangedEventType events |
off("Captions |
Unsubscribe function for any of the CaptionsPropertyChangedEventType events |
off("Spoken |
Unsubscribe function for any of the SpokenLanguageChangedEventType events |
on("Captions |
Subscribe function for any of the CaptionsPropertyChangedEventType events |
on("Captions |
Subscribe function for the CaptionsReceivedEventType event |
on("Spoken |
Subscribe function for any of the SpokenLanguageChangedEventType events |
Inherited 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 |
Inherited Property Details
activeSpokenLanguage
Indicates the current active spoken language in the call in BCP 47 format
activeSpokenLanguage: string
Property Value
string
Inherited From CaptionsCommon.activeSpokenLanguage
isCaptionsFeatureActive
Indicates if captions are active in the current call
isCaptionsFeatureActive: boolean
Property Value
boolean
Inherited From CaptionsCommon.isCaptionsFeatureActive
kind
Indicates the Captions type for the active captions object
kind: CaptionsKind
Property Value
Inherited From CaptionsCommon.kind
supportedSpokenLanguages
List of supported spoken languages to use with the caption service in BCP 47 format
supportedSpokenLanguages: string[]
Property Value
string[]
Inherited From CaptionsCommon.supportedSpokenLanguages
Method Details
off("CaptionsActiveChanged", PropertyChangedEvent)
Unsubscribe function for any of the CaptionsPropertyChangedEventType events
function off(event: "CaptionsActiveChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"CaptionsActiveChanged"
event name
- listener
- PropertyChangedEvent
callback fn that was used to subscribe to this event
off("CaptionsReceived", CaptionsHandler)
Unsubscribe function for any of the CaptionsPropertyChangedEventType events
function off(event: "CaptionsReceived", listener: CaptionsHandler)
Parameters
- event
-
"CaptionsReceived"
event name
- listener
- CaptionsHandler
callback fn that was used to subscribe to this event
off("SpokenLanguageChanged", PropertyChangedEvent)
Unsubscribe function for any of the SpokenLanguageChangedEventType events
function off(event: "SpokenLanguageChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"SpokenLanguageChanged"
event name
- listener
- PropertyChangedEvent
callback fn that was used to subscribe to this event
on("CaptionsActiveChanged", PropertyChangedEvent)
Subscribe function for any of the CaptionsPropertyChangedEventType events
function on(event: "CaptionsActiveChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"CaptionsActiveChanged"
event name
- listener
- PropertyChangedEvent
callback fn that was used to subscribe to this event
on("CaptionsReceived", CaptionsHandler)
Subscribe function for the CaptionsReceivedEventType event
function on(event: "CaptionsReceived", listener: CaptionsHandler)
Parameters
- event
-
"CaptionsReceived"
event name
- listener
- CaptionsHandler
callback fn that was used to subscribe to this event
on("SpokenLanguageChanged", PropertyChangedEvent)
Subscribe function for any of the SpokenLanguageChangedEventType events
function on(event: "SpokenLanguageChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"SpokenLanguageChanged"
event name
- listener
- PropertyChangedEvent
callback fn that was used to subscribe to this event
Inherited 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.
Inherited From CaptionsCommon.setSpokenLanguage
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.
Inherited From CaptionsCommon.startCaptions
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.
Inherited From CaptionsCommon.stopCaptions