File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
articles/communication-services/how-tos/calling-sdk/includes/call-transcription Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ author : tomaschladek
3
+ ms.service : azure-communication-services
4
+ ms.topic : include
5
+ ms.date : 08/08/2024
6
+ ms.author : tchladek
7
+ ---
8
+
9
+ ## Call transcription
10
+
11
+ ` Transcription ` is an extended feature of the class ` Call ` . You first need to obtain the transcription feature API object
12
+
13
+ ``` js
14
+ const callTranscriptionApi = call .api (Features .Transcription );
15
+ ```
16
+
17
+ You can check state of the transcription in the property ` isTranscriptionActive ` . If value is set to ` true ` , then transcription is active.
18
+
19
+ ``` js
20
+ const isTranscriptionActive = callTranscriptionApi .isTranscriptionActive ;
21
+ ```
22
+
23
+ You can subscribe to event, that is triggered when state of transcription changes:
24
+
25
+ ``` js
26
+ const isTranscriptionActiveChangedHandler = () => {
27
+ console .log (callTranscriptionApi .isTranscriptionActive );
28
+ };
29
+ callRecordingApi .on (' isTranscriptionActiveChanged' , isTranscriptionActiveChangedHandler);
30
+ ```
31
+
32
+ You can unsubscribe from the event with the following code:
33
+
34
+ ``` js
35
+ callRecordingApi .off (' isTranscriptionActiveChanged' , isTranscriptionActiveChangedHandler);
36
+ ```
You can’t perform that action at this time.
0 commit comments