@webex/plugin-meetings 2.60.1-next.2 → 2.60.1-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,6 +33,12 @@ import {
33
33
  RemoteStream,
34
34
  } from '@webex/media-helpers';
35
35
 
36
+ import {
37
+ EVENT_TRIGGERS as VOICEAEVENTS,
38
+ TURN_ON_CAPTION_STATUS,
39
+ } from '@webex/internal-plugin-voicea';
40
+ import {processNewCaptions, processHighlightCreated} from './voicea-meeting';
41
+
36
42
  import {
37
43
  MeetingNotActiveError,
38
44
  UserInLobbyError,
@@ -40,6 +46,7 @@ import {
40
46
  UserNotJoinedError,
41
47
  AddMediaFailed,
42
48
  } from '../common/errors/webex-errors';
49
+
43
50
  import {StatsAnalyzer, EVENTS as StatsAnalyzerEvents} from '../statsAnalyzer';
44
51
  import NetworkQualityMonitor from '../networkQualityMonitor';
45
52
  import LoggerProxy from '../common/logs/logger-proxy';
@@ -59,7 +66,6 @@ import MeetingsUtil from '../meetings/util';
59
66
  import RecordingUtil from '../recording-controller/util';
60
67
  import ControlsOptionsUtil from '../controls-options-manager/util';
61
68
  import MediaUtil from '../media/util';
62
- import Transcription from '../transcription';
63
69
  import {Reactions, SkinTones} from '../reactions/reactions';
64
70
  import PasswordError from '../common/errors/password-error';
65
71
  import CaptchaError from '../common/errors/captcha-error';
@@ -97,7 +103,6 @@ import {
97
103
  SHARE_STATUS,
98
104
  SHARE_STOPPED_REASON,
99
105
  VIDEO,
100
- HTTP_VERBS,
101
106
  SELF_ROLES,
102
107
  INTERPRETATION,
103
108
  SELF_POLICY,
@@ -105,6 +110,7 @@ import {
105
110
  MEETING_PERMISSION_TOKEN_REFRESH_REASON,
106
111
  ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT,
107
112
  RECONNECTION,
113
+ LANGUAGE_ENGLISH,
108
114
  } from '../constants';
109
115
  import BEHAVIORAL_METRICS from '../metrics/constants';
110
116
  import ParameterError from '../common/errors/parameter';
@@ -158,6 +164,37 @@ const logRequest = (request: any, {logText = ''}) => {
158
164
  });
159
165
  };
160
166
 
167
+ export type CaptionData = {
168
+ id: string;
169
+ isFinal: boolean;
170
+ translations: Array<string>;
171
+ text: string;
172
+ currentCaptionLanguage: string;
173
+ timestamp: string;
174
+ speaker: string;
175
+ };
176
+
177
+ export type Transcription = {
178
+ languageOptions: {
179
+ captionLanguages?: string; // list of supported caption languages from backend
180
+ maxLanguages?: number;
181
+ spokenLanguages?: Array<string>; // list of supported spoken languages from backend
182
+ currentCaptionLanguage?: string; // current caption language - default is english
183
+ requestedCaptionLanguage?: string; // requested caption language
184
+ currentSpokenLanguage?: string; // current spoken language - default is english
185
+ };
186
+ status: string;
187
+ isListening: boolean;
188
+ commandText: string;
189
+ captions: Array<CaptionData>;
190
+ highlights: Array<any>;
191
+ showCaptionBox: boolean;
192
+ transcribingRequestStatus: string;
193
+ isCaptioning: boolean;
194
+ speakerProxy: Map<string, any>;
195
+ interimCaptions: Map<string, CaptionData>;
196
+ };
197
+
161
198
  export type LocalStreams = {
162
199
  microphone?: LocalMicrophoneStream;
163
200
  camera?: LocalCameraStream;
@@ -549,7 +586,6 @@ export default class Meeting extends StatelessWebexPlugin {
549
586
  screenShareFloorState: ScreenShareFloorStatus;
550
587
  statsAnalyzer: StatsAnalyzer;
551
588
  transcription: Transcription;
552
- receiveTranscription: boolean;
553
589
  updateMediaConnections: (mediaConnections: any[]) => void;
554
590
  userDisplayHints: any;
555
591
  endCallInitJoinReq: any;
@@ -581,6 +617,49 @@ export default class Meeting extends StatelessWebexPlugin {
581
617
  allowMediaInLobby: boolean;
582
618
  turnDiscoverySkippedReason: string;
583
619
  turnServerUsed: boolean;
620
+ areVoiceaEventsSetup = false;
621
+ voiceaListenerCallbacks: object = {
622
+ [VOICEAEVENTS.VOICEA_ANNOUNCEMENT]: (payload: Transcription['languageOptions']) => {
623
+ this.transcription.languageOptions = payload;
624
+ Trigger.trigger(
625
+ this,
626
+ {
627
+ file: 'meeting/index',
628
+ function: 'setUpVoiceaListeners',
629
+ },
630
+ EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION,
631
+ payload
632
+ );
633
+ },
634
+ [VOICEAEVENTS.CAPTIONS_TURNED_ON]: () => {
635
+ this.transcription.status = TURN_ON_CAPTION_STATUS.ENABLED;
636
+ },
637
+ [VOICEAEVENTS.EVA_COMMAND]: (payload) => {
638
+ const {data} = payload;
639
+
640
+ this.transcription.isListening = !!data.isListening;
641
+ this.transcription.commandText = data.text ?? '';
642
+ },
643
+ [VOICEAEVENTS.NEW_CAPTION]: (data) => {
644
+ processNewCaptions({data, meeting: this});
645
+ Trigger.trigger(
646
+ this,
647
+ {
648
+ file: 'meeting/index',
649
+ function: 'setUpVoiceaListeners',
650
+ },
651
+ EVENT_TRIGGERS.MEETING_CAPTION_RECEIVED,
652
+ {
653
+ captions: this.transcription.captions,
654
+ interimCaptions: this.transcription.interimCaptions,
655
+ }
656
+ );
657
+ },
658
+ [VOICEAEVENTS.HIGHLIGHT_CREATED]: (data) => {
659
+ processHighlightCreated({data, meeting: this});
660
+ },
661
+ };
662
+
584
663
  private retriedWithTurnServer: boolean;
585
664
  private sendSlotManager: SendSlotManager = new SendSlotManager(LoggerProxy);
586
665
  private deferSDPAnswer?: Defer; // used for waiting for a response
@@ -1179,7 +1258,18 @@ export default class Meeting extends StatelessWebexPlugin {
1179
1258
  * @private
1180
1259
  * @memberof Meeting
1181
1260
  */
1182
- this.transcription = undefined;
1261
+ this.transcription = {
1262
+ captions: [],
1263
+ highlights: [],
1264
+ isListening: false,
1265
+ commandText: '',
1266
+ languageOptions: {},
1267
+ showCaptionBox: false,
1268
+ transcribingRequestStatus: 'INACTIVE',
1269
+ isCaptioning: false,
1270
+ interimCaptions: {} as Map<string, CaptionData>,
1271
+ speakerProxy: {} as Map<string, any>,
1272
+ } as Transcription;
1183
1273
 
1184
1274
  /**
1185
1275
  * Password status. If it's PASSWORD_STATUS.REQUIRED then verifyPassword() needs to be called
@@ -1840,6 +1930,7 @@ export default class Meeting extends StatelessWebexPlugin {
1840
1930
  * @memberof Meeting
1841
1931
  */
1842
1932
  private setUpInterpretationListener() {
1933
+ // TODO: check if its getting used or not
1843
1934
  this.simultaneousInterpretation.on(INTERPRETATION.EVENTS.SUPPORT_LANGUAGES_UPDATE, () => {
1844
1935
  Trigger.trigger(
1845
1936
  this,
@@ -1850,7 +1941,7 @@ export default class Meeting extends StatelessWebexPlugin {
1850
1941
  EVENT_TRIGGERS.MEETING_INTERPRETATION_SUPPORT_LANGUAGES_UPDATE
1851
1942
  );
1852
1943
  });
1853
-
1944
+ // TODO: check if its getting used or not
1854
1945
  this.simultaneousInterpretation.on(
1855
1946
  INTERPRETATION.EVENTS.HANDOFF_REQUESTS_ARRIVED,
1856
1947
  (payload) => {
@@ -1867,6 +1958,44 @@ export default class Meeting extends StatelessWebexPlugin {
1867
1958
  );
1868
1959
  }
1869
1960
 
1961
+ /**
1962
+ * Set up the listeners for captions
1963
+ * @returns {undefined}
1964
+ * @private
1965
+ * @memberof Meeting
1966
+ */
1967
+ private setUpVoiceaListeners() {
1968
+ // @ts-ignore
1969
+ this.webex.internal.voicea.on(
1970
+ VOICEAEVENTS.VOICEA_ANNOUNCEMENT,
1971
+ this.voiceaListenerCallbacks[VOICEAEVENTS.VOICEA_ANNOUNCEMENT]
1972
+ );
1973
+
1974
+ // @ts-ignore
1975
+ this.webex.internal.voicea.on(
1976
+ VOICEAEVENTS.CAPTIONS_TURNED_ON,
1977
+ this.voiceaListenerCallbacks[VOICEAEVENTS.CAPTIONS_TURNED_ON]
1978
+ );
1979
+
1980
+ // @ts-ignore
1981
+ this.webex.internal.voicea.on(
1982
+ VOICEAEVENTS.EVA_COMMAND,
1983
+ this.voiceaListenerCallbacks[VOICEAEVENTS.EVA_COMMAND]
1984
+ );
1985
+
1986
+ // @ts-ignore
1987
+ this.webex.internal.voicea.on(
1988
+ VOICEAEVENTS.NEW_CAPTION,
1989
+ this.voiceaListenerCallbacks[VOICEAEVENTS.NEW_CAPTION]
1990
+ );
1991
+
1992
+ // @ts-ignore
1993
+ this.webex.internal.voicea.on(
1994
+ VOICEAEVENTS.HIGHLIGHT_CREATED,
1995
+ this.voiceaListenerCallbacks[VOICEAEVENTS.HIGHLIGHT_CREATED]
1996
+ );
1997
+ }
1998
+
1870
1999
  /**
1871
2000
  * Set up the locus info listener for meetings disconnected due to inactivity
1872
2001
  * @returns {undefined}
@@ -2186,19 +2315,22 @@ export default class Meeting extends StatelessWebexPlugin {
2186
2315
  this.locusInfo.on(
2187
2316
  LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIBE_UPDATED,
2188
2317
  ({caption, transcribing}) => {
2189
- // @ts-ignore - config coming from registerPlugin
2190
- if (transcribing && !this.transcription && this.config.receiveTranscription) {
2191
- this.startTranscription();
2192
- } else if (!transcribing && this.transcription) {
2193
- Trigger.trigger(
2194
- this,
2195
- {
2196
- file: 'meeting/index',
2197
- function: 'setupLocusControlsListener',
2198
- },
2199
- EVENT_TRIGGERS.MEETING_STOPPED_RECEIVING_TRANSCRIPTION,
2200
- {caption, transcribing}
2201
- );
2318
+ // user need to be joined to start the llm and receive transcription
2319
+ if (this.isJoined()) {
2320
+ // @ts-ignore - config coming from registerPlugin
2321
+ if (transcribing && !this.transcription) {
2322
+ this.startTranscription();
2323
+ } else if (!transcribing && this.transcription) {
2324
+ Trigger.trigger(
2325
+ this,
2326
+ {
2327
+ file: 'meeting/index',
2328
+ function: 'setupLocusControlsListener',
2329
+ },
2330
+ EVENT_TRIGGERS.MEETING_STOPPED_RECEIVING_TRANSCRIPTION,
2331
+ {caption, transcribing}
2332
+ );
2333
+ }
2202
2334
  }
2203
2335
  }
2204
2336
  );
@@ -2852,15 +2984,6 @@ export default class Meeting extends StatelessWebexPlugin {
2852
2984
  });
2853
2985
  this.locusInfo.on(LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, async (payload) => {
2854
2986
  this.stopKeepAlive();
2855
- // @ts-ignore
2856
- if (!this.transcription && (this.config.receiveTranscription || this.receiveTranscription)) {
2857
- if (this.isTranscriptionSupported()) {
2858
- await this.startTranscription();
2859
- LoggerProxy.logger.info(
2860
- 'Meeting:index#setUpLocusInfoSelfListener --> enabled to receive transcription for guest user!'
2861
- );
2862
- }
2863
- }
2864
2987
 
2865
2988
  if (payload) {
2866
2989
  Trigger.trigger(
@@ -4419,7 +4542,7 @@ export default class Meeting extends StatelessWebexPlugin {
4419
4542
  }
4420
4543
 
4421
4544
  LoggerProxy.logger.error(
4422
- 'Meeting:index#isTranscriptionSupported --> Webex Assistant is not supported'
4545
+ 'Meeting:index#isTranscriptionSupported --> Webex Assistant is not enabled/supported'
4423
4546
  );
4424
4547
 
4425
4548
  return false;
@@ -4440,109 +4563,136 @@ export default class Meeting extends StatelessWebexPlugin {
4440
4563
  }
4441
4564
 
4442
4565
  /**
4443
- * Monitor the Low-Latency Mercury (LLM) web socket connection on `onError` and `onClose` states
4444
- * @private
4445
- * @returns {void}
4566
+ * sets Caption language for the meeting
4567
+ * @param {string} language
4568
+ * @returns {Promise}
4446
4569
  */
4447
- private monitorTranscriptionSocketConnection() {
4448
- this.transcription.onCloseSocket((event) => {
4449
- LoggerProxy.logger.info(
4450
- `Meeting:index#onCloseSocket -->
4451
- unable to continue receiving transcription;
4452
- low-latency mercury web socket connection is closed now.
4453
- ${event}`
4454
- );
4455
-
4456
- this.triggerStopReceivingTranscriptionEvent();
4457
- });
4570
+ public setCaptionLanguage(language: string) {
4571
+ return new Promise((resolve, reject) => {
4572
+ if (!this.isTranscriptionSupported()) {
4573
+ LoggerProxy.logger.error(
4574
+ 'Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported'
4575
+ );
4458
4576
 
4459
- this.transcription.onErrorSocket((event) => {
4460
- LoggerProxy.logger.error(
4461
- `Meeting:index#onErrorSocket -->
4462
- unable to continue receiving transcription;
4463
- low-latency mercury web socket connection error had occured.
4464
- ${event}`
4465
- );
4577
+ reject(new Error('Webex Assistant is not enabled/supported'));
4578
+ }
4466
4579
 
4467
- this.triggerStopReceivingTranscriptionEvent();
4580
+ try {
4581
+ const voiceaListenerCaptionUpdate = (payload) => {
4582
+ // @ts-ignore
4583
+ this.webex.internal.voicea.off(
4584
+ VOICEAEVENTS.CAPTION_LANGUAGE_UPDATE,
4585
+ voiceaListenerCaptionUpdate
4586
+ );
4587
+ const {statusCode} = payload;
4588
+
4589
+ if (statusCode === 200) {
4590
+ const currentCaptionLanguage =
4591
+ this.transcription.languageOptions.requestedCaptionLanguage ?? LANGUAGE_ENGLISH;
4592
+ this.transcription.languageOptions = {
4593
+ ...this.transcription.languageOptions,
4594
+ currentCaptionLanguage,
4595
+ };
4596
+ resolve(currentCaptionLanguage);
4597
+ } else {
4598
+ reject(payload);
4599
+ }
4600
+ };
4601
+ // @ts-ignore
4602
+ this.webex.internal.voicea.on(
4603
+ VOICEAEVENTS.CAPTION_LANGUAGE_UPDATE,
4604
+ voiceaListenerCaptionUpdate
4605
+ );
4606
+ // @ts-ignore
4607
+ this.webex.internal.voicea.requestLanguage(language);
4608
+ } catch (error) {
4609
+ LoggerProxy.logger.error(`Meeting:index#setCaptionLanguage --> ${error}`);
4468
4610
 
4469
- Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.RECEIVE_TRANSCRIPTION_FAILURE, {
4470
- correlation_id: this.correlationId,
4471
- reason: 'unexpected error: transcription LLM web socket connection error had occured.',
4472
- event,
4473
- });
4611
+ reject(error);
4612
+ }
4474
4613
  });
4475
4614
  }
4476
4615
 
4477
4616
  /**
4478
- * Request for a WebSocket Url, open and monitor the WebSocket connection
4479
- * @private
4480
- * @returns {Promise<void>} a promise to open the WebSocket connection
4617
+ * sets Spoken language for the meeting
4618
+ * @param {string} language
4619
+ * @returns {Promise}
4481
4620
  */
4482
- private async startTranscription() {
4483
- LoggerProxy.logger.info(
4484
- `Meeting:index#startTranscription -->
4485
- Attempting to generate a web socket url.`
4486
- );
4621
+ public setSpokenLanguage(language: string) {
4622
+ return new Promise((resolve, reject) => {
4623
+ if (!this.isTranscriptionSupported()) {
4624
+ LoggerProxy.logger.error(
4625
+ 'Meeting:index#setCaptionLanguage --> Webex Assistant is not enabled/supported'
4626
+ );
4487
4627
 
4488
- try {
4489
- const {datachannelUrl} = this.locusInfo.info;
4490
- // @ts-ignore - fix type
4491
- const {
4492
- body: {webSocketUrl},
4493
- // @ts-ignore
4494
- } = await this.request({
4495
- method: HTTP_VERBS.POST,
4496
- uri: datachannelUrl,
4497
- body: {deviceUrl: this.deviceUrl},
4498
- });
4628
+ reject(new Error('Webex Assistant is not enabled/supported'));
4629
+ }
4499
4630
 
4500
- LoggerProxy.logger.info(
4501
- `Meeting:index#startTranscription -->
4502
- Generated web socket url succesfully.`
4503
- );
4631
+ try {
4632
+ const voiceaListenerLanguageUpdate = (payload) => {
4633
+ // @ts-ignore
4634
+ this.webex.internal.voicea.off(
4635
+ VOICEAEVENTS.SPOKEN_LANGUAGE_UPDATE,
4636
+ voiceaListenerLanguageUpdate
4637
+ );
4638
+ const {languageCode} = payload;
4504
4639
 
4505
- this.transcription = new Transcription(
4506
- webSocketUrl,
4507
- // @ts-ignore - fix type
4508
- this.webex.sessionId,
4509
- this.members
4510
- );
4640
+ if (languageCode) {
4641
+ this.transcription.languageOptions = {
4642
+ ...this.transcription.languageOptions,
4643
+ currentSpokenLanguage: languageCode,
4644
+ };
4645
+ resolve(languageCode);
4646
+ } else {
4647
+ reject(payload);
4648
+ }
4649
+ };
4650
+ // @ts-ignore
4651
+ this.webex.internal.voicea.on(
4652
+ VOICEAEVENTS.SPOKEN_LANGUAGE_UPDATE,
4653
+ voiceaListenerLanguageUpdate
4654
+ );
4655
+ // @ts-ignore
4656
+ this.webex.internal.voicea.setSpokenLanguage(language);
4657
+ } catch (error) {
4658
+ LoggerProxy.logger.error(`Meeting:index#setSpokenLanguage --> ${error}`);
4511
4659
 
4660
+ reject(error);
4661
+ }
4662
+ });
4663
+ }
4664
+
4665
+ /**
4666
+ * This method will enable the transcription for the current meeting if the meeting has enabled/supports Webex Assistant
4667
+ * @param {Object} options object with spokenlanguage setting
4668
+ * @public
4669
+ * @returns {Promise<void>} a promise to open the WebSocket connection
4670
+ */
4671
+ public async startTranscription(options?: {spokenLanguage?: string}) {
4672
+ if (this.isJoined()) {
4512
4673
  LoggerProxy.logger.info(
4513
- `Meeting:index#startTranscription -->
4514
- opened LLM web socket connection successfully.`
4674
+ 'Meeting:index#startTranscription --> Attempting to enable transcription!'
4515
4675
  );
4516
4676
 
4517
- if (!this.inMeetingActions.isClosedCaptionActive) {
4518
- LoggerProxy.logger.error(
4519
- `Meeting:index#receiveTranscription --> Transcription cannot be started until a licensed user enables it`
4520
- );
4677
+ try {
4678
+ if (!this.areVoiceaEventsSetup) {
4679
+ this.setUpVoiceaListeners();
4680
+ this.areVoiceaEventsSetup = true;
4681
+ }
4682
+ // @ts-ignore
4683
+ await this.webex.internal.voicea.toggleTranscribing(true, options?.spokenLanguage);
4684
+ } catch (error) {
4685
+ LoggerProxy.logger.error(`Meeting:index#startTranscription --> ${error}`);
4686
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.RECEIVE_TRANSCRIPTION_FAILURE, {
4687
+ correlation_id: this.correlationId,
4688
+ reason: error.message,
4689
+ stack: error.stack,
4690
+ });
4521
4691
  }
4522
-
4523
- // retrieve and pass the payload
4524
- this.transcription.subscribe((payload) => {
4525
- Trigger.trigger(
4526
- this,
4527
- {
4528
- file: 'meeting/index',
4529
- function: 'join',
4530
- },
4531
- EVENT_TRIGGERS.MEETING_STARTED_RECEIVING_TRANSCRIPTION,
4532
- payload
4533
- );
4534
- });
4535
-
4536
- this.monitorTranscriptionSocketConnection();
4537
- // @ts-ignore - fix type
4538
- this.transcription.connect(this.webex.credentials.supertoken.access_token);
4539
- } catch (error) {
4540
- LoggerProxy.logger.error(`Meeting:index#startTranscription --> ${error}`);
4541
- Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.RECEIVE_TRANSCRIPTION_FAILURE, {
4542
- correlation_id: this.correlationId,
4543
- reason: error.message,
4544
- stack: error.stack,
4545
- });
4692
+ } else {
4693
+ LoggerProxy.logger.error(
4694
+ `Meeting:index#startTranscription --> meeting joined : ${this.isJoined()}`
4695
+ );
4546
4696
  }
4547
4697
  }
4548
4698
 
@@ -4585,13 +4735,42 @@ export default class Meeting extends StatelessWebexPlugin {
4585
4735
  };
4586
4736
 
4587
4737
  /**
4588
- * stop recieving Transcription by closing
4589
- * the web socket connection properly
4738
+ * This method stops receiving transcription for the current meeting
4590
4739
  * @returns {void}
4591
4740
  */
4592
- stopReceivingTranscription() {
4741
+ stopTranscription() {
4593
4742
  if (this.transcription) {
4594
- this.transcription.closeSocket();
4743
+ // @ts-ignore
4744
+ this.webex.internal.voicea.off(
4745
+ VOICEAEVENTS.VOICEA_ANNOUNCEMENT,
4746
+ this.voiceaListenerCallbacks[VOICEAEVENTS.VOICEA_ANNOUNCEMENT]
4747
+ );
4748
+
4749
+ // @ts-ignore
4750
+ this.webex.internal.voicea.off(
4751
+ VOICEAEVENTS.CAPTIONS_TURNED_ON,
4752
+ this.voiceaListenerCallbacks[VOICEAEVENTS.CAPTIONS_TURNED_ON]
4753
+ );
4754
+
4755
+ // @ts-ignore
4756
+ this.webex.internal.voicea.off(
4757
+ VOICEAEVENTS.EVA_COMMAND,
4758
+ this.voiceaListenerCallbacks[VOICEAEVENTS.EVA_COMMAND]
4759
+ );
4760
+
4761
+ // @ts-ignore
4762
+ this.webex.internal.voicea.off(
4763
+ VOICEAEVENTS.NEW_CAPTION,
4764
+ this.voiceaListenerCallbacks[VOICEAEVENTS.NEW_CAPTION]
4765
+ );
4766
+
4767
+ // @ts-ignore
4768
+ this.webex.internal.voicea.off(
4769
+ VOICEAEVENTS.HIGHLIGHT_CREATED,
4770
+ this.voiceaListenerCallbacks[VOICEAEVENTS.HIGHLIGHT_CREATED]
4771
+ );
4772
+ this.areVoiceaEventsSetup = false;
4773
+ this.triggerStopReceivingTranscriptionEvent();
4595
4774
  }
4596
4775
  }
4597
4776
 
@@ -4604,7 +4783,7 @@ export default class Meeting extends StatelessWebexPlugin {
4604
4783
  private triggerStopReceivingTranscriptionEvent() {
4605
4784
  LoggerProxy.logger.info(`
4606
4785
  Meeting:index#stopReceivingTranscription -->
4607
- closed transcription LLM web socket connection successfully.`);
4786
+ closed voicea event listeners successfully.`);
4608
4787
 
4609
4788
  Trigger.trigger(
4610
4789
  this,
@@ -4792,7 +4971,6 @@ export default class Meeting extends StatelessWebexPlugin {
4792
4971
  joinSuccess(join);
4793
4972
 
4794
4973
  this.deferJoin = undefined;
4795
- this.receiveTranscription = !!options.receiveTranscription;
4796
4974
 
4797
4975
  return join;
4798
4976
  })
@@ -4847,39 +5025,6 @@ export default class Meeting extends StatelessWebexPlugin {
4847
5025
  });
4848
5026
  }
4849
5027
 
4850
- return join;
4851
- })
4852
- .then((join) => {
4853
- if (isBrowser) {
4854
- // @ts-ignore - config coming from registerPlugin
4855
- if (this.config.receiveTranscription || options.receiveTranscription) {
4856
- if (this.isTranscriptionSupported()) {
4857
- LoggerProxy.logger.info(
4858
- 'Meeting:index#join --> Attempting to enabled to receive transcription!'
4859
- );
4860
- this.startTranscription().catch((error) => {
4861
- LoggerProxy.logger.error(
4862
- 'Meeting:index#join --> Receive Transcription Failed',
4863
- error
4864
- );
4865
-
4866
- Metrics.sendBehavioralMetric(
4867
- BEHAVIORAL_METRICS.RECEIVE_TRANSCRIPTION_AFTER_JOIN_FAILURE,
4868
- {
4869
- correlation_id: this.correlationId,
4870
- reason: error?.message,
4871
- stack: error.stack,
4872
- }
4873
- );
4874
- });
4875
- }
4876
- }
4877
- } else {
4878
- LoggerProxy.logger.error(
4879
- 'Meeting:index#join --> Receving transcription is not supported on this platform'
4880
- );
4881
- }
4882
-
4883
5028
  return join;
4884
5029
  });
4885
5030
  }
@@ -7618,8 +7763,7 @@ export default class Meeting extends StatelessWebexPlugin {
7618
7763
  this.queuedMediaUpdates = [];
7619
7764
 
7620
7765
  if (this.transcription) {
7621
- this.transcription.closeSocket();
7622
- this.triggerStopReceivingTranscriptionEvent();
7766
+ this.stopTranscription();
7623
7767
  this.transcription = undefined;
7624
7768
  }
7625
7769
  };