@wildix/wilma-voice-client 0.0.41 → 0.0.43

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MediaVadFrameType = exports.MediaStartFrameType = exports.MediaRunPurpose = exports.MediaAudioEncoding = exports.MediaPlaybackFrameType = exports.MediaPlaybackEvent = exports.MediaPlaybackStopCause = exports.MediaFinishFrameType = exports.MediaFinishReason = exports.MediaDtmfFrameType = exports.MediaTransferFrameType = exports.MediaTranscriptionFrameType = exports.MediaParty = exports.MediaStopFrameType = exports.MediaStartedFrameType = exports.MediaRestoreFrameType = exports.MediaLanguageFrameType = exports.MediaHangupFrameType = exports.MediaFinishedFrameType = exports.MediaErrorFrameType = exports.MediaDuckFrameType = exports.MediaAudioEndFrameType = exports.MediaAudioBeginFrameType = exports.VoiceCommandType = exports.VoiceInputMode = exports.VoiceAudioEncoding = exports.VoiceCallToolPhase = exports.VoiceCallEndReason = exports.VoiceControlAction = exports.VoiceEventType = exports.VoicePronunciationEncoding = void 0;
3
+ exports.MediaVadFrameType = exports.MediaStartFrameType = exports.MediaRunPurpose = exports.MediaAudioEncoding = exports.MediaPlaybackFrameType = exports.MediaPlaybackEvent = exports.MediaPlaybackStopCause = exports.MediaFinishFrameType = exports.MediaFinishReason = exports.MediaDtmfFrameType = exports.MediaTransferFrameType = exports.MediaTranscriptionFrameType = exports.MediaParty = exports.MediaStopFrameType = exports.MediaStartedFrameType = exports.MediaRestoreFrameType = exports.MediaLanguageFrameType = exports.MediaHangupFrameType = exports.MediaFinishedFrameType = exports.MediaErrorFrameType = exports.MediaDuckFrameType = exports.MediaAudioEndFrameType = exports.MediaAudioBeginFrameType = exports.VoiceCommandType = exports.VoiceInputMode = exports.VoiceAudioEncoding = exports.VoiceTranscriptionDropReason = exports.VoiceCallToolPhase = exports.VoiceCallEndReason = exports.VoiceControlAction = exports.VoiceEventType = exports.VoicePronunciationEncoding = void 0;
4
4
  exports.VoicePronunciationEncoding = {
5
5
  ALIAS: "alias",
6
6
  IPA: "ipa",
@@ -34,6 +34,10 @@ exports.VoiceCallToolPhase = {
34
34
  FINISHED: "finished",
35
35
  STARTED: "started",
36
36
  };
37
+ exports.VoiceTranscriptionDropReason = {
38
+ LOW_CONFIDENCE: "low_confidence",
39
+ OTHER_SPEAKER: "other_speaker",
40
+ };
37
41
  exports.VoiceAudioEncoding = {
38
42
  ALAW: "alaw",
39
43
  MULAW: "mulaw",
@@ -164,6 +164,7 @@ const _dN = "dialedNumber";
164
164
  const _dVD = "duckVolumeDb";
165
165
  const _di = "digits";
166
166
  const _dr = "draft";
167
+ const _dro = "dropped";
167
168
  const _dt = "dtmf";
168
169
  const _du = "duck";
169
170
  const _e = "error";
@@ -205,6 +206,7 @@ const _m = "message";
205
206
  const _mC = "minConfidence";
206
207
  const _mT = "mediaType";
207
208
  const _mW = "minWords";
209
+ const _mWM = "maxWaitMs";
208
210
  const _me = "media";
209
211
  const _met = "metadata";
210
212
  const _n = "name";
@@ -231,9 +233,10 @@ const _rAMe = "restoreAfterMs";
231
233
  const _rI = "replyId";
232
234
  const _rM = "rampMs";
233
235
  const _rWE = "replyWebsocketEvent";
234
- const _re = "restore";
236
+ const _re = "recogniser";
235
237
  const _rep = "reply";
236
- const _res = "resume";
238
+ const _res = "restore";
239
+ const _resu = "resume";
237
240
  const _ret = "retryable";
238
241
  const _s = "smithy.ts.sdk.synthetic.wildix.wilma.voice";
239
242
  const _sEWE = "sessionEndedWebsocketEvent";
@@ -379,8 +382,8 @@ exports.GetVoiceDefaultsInput$ = [3, n1, _GVDI,
379
382
  ];
380
383
  exports.GetVoiceDefaultsOutput$ = [3, n1, _GVDO,
381
384
  0,
382
- [_vD, _in, _tE],
383
- [() => exports.VoiceDetectionDefaults$, () => exports.VoiceInterruptionDefaults$, () => exports.VoiceTurnEndDefaults$], 3
385
+ [_re, _vD, _in, _tE],
386
+ [0, () => exports.VoiceDetectionDefaults$, () => exports.VoiceInterruptionDefaults$, () => exports.VoiceTurnEndDefaults$], 4
384
387
  ];
385
388
  exports.HangupCommandData$ = [3, n1, _HCD,
386
389
  0,
@@ -429,7 +432,7 @@ exports.MediaAudioFormat$ = [3, n1, _MAF,
429
432
  ];
430
433
  exports.MediaCloudFrames$ = [3, n1, _MCF,
431
434
  0,
432
- [_sta, _tr, _aB, _au, _aE, _sto, _du, _re, _l, _tra, _h, _e, _fi],
435
+ [_sta, _tr, _aB, _au, _aE, _sto, _du, _res, _l, _tra, _h, _e, _fi],
433
436
  [() => exports.MediaStartedFrame$, () => exports.MediaTranscriptionFrame$, () => exports.MediaAudioBeginFrame$, 21, () => exports.MediaAudioEndFrame$, () => exports.MediaStopFrame$, () => exports.MediaDuckFrame$, () => exports.MediaRestoreFrame$, () => exports.MediaLanguageFrame$, () => exports.MediaTransferFrame$, () => exports.MediaHangupFrame$, () => exports.MediaErrorFrame$, () => exports.MediaFinishedFrame$]
434
437
  ];
435
438
  exports.MediaDtmfFrame$ = [3, n1, _MDF,
@@ -509,7 +512,7 @@ exports.MediaStartedFrame$ = [3, n1, _MSF,
509
512
  ];
510
513
  exports.MediaStartFrame$ = [3, n1, _MSFe,
511
514
  0,
512
- [_t, _pu, _cI, _fI, _sIe, _res, _rAM, _au, _cal, _ag, _la, _pL, _aD, _dN, _var],
515
+ [_t, _pu, _cI, _fI, _sIe, _resu, _rAM, _au, _cal, _ag, _la, _pL, _aD, _dN, _var],
513
516
  [0, 0, 0, 1, 0, 2, 1, () => exports.MediaAudioFormat$, () => exports.MediaStartCaller$, () => exports.MediaStartAgent$, 64 | 0, 0, 2, 0, 0], 9
514
517
  ];
515
518
  exports.MediaStopFrame$ = [3, n1, _MSFed,
@@ -759,8 +762,8 @@ exports.VoiceCallToolEvent$ = [3, n1, _VCTE,
759
762
  ];
760
763
  exports.VoiceCallTranscriptionEvent$ = [3, n1, _VCTEo,
761
764
  0,
762
- [_i, _te, _f, _l, _ti],
763
- [0, 0, 2, 0, 1], 3
765
+ [_i, _te, _f, _l, _ti, _dro],
766
+ [0, 0, 2, 0, 1, 0], 3
764
767
  ];
765
768
  exports.VoiceConnectParams$ = [3, n1, _VCP,
766
769
  0,
@@ -789,8 +792,8 @@ exports.VoiceSpeechPayload$ = [3, n1, _VSP,
789
792
  ];
790
793
  exports.VoiceTurnEndDefaults$ = [3, n1, _VTED,
791
794
  0,
792
- [_hM],
793
- [1], 1
795
+ [_hM, _mWM],
796
+ [128 | 1, 1], 2
794
797
  ];
795
798
  var LanguageCodeList = 64 | 0;
796
799
  var VoicePronunciationList = [1, n2, _VPL,
@@ -800,6 +803,7 @@ var MediaStartLanguageList = 64 | 0;
800
803
  var VoiceList = [1, n1, _VL,
801
804
  0, () => exports.Voice$
802
805
  ];
806
+ var VoiceHoldByRecogniser = 128 | 1;
803
807
  exports.VoiceCallEvent$ = [4, n1, _VCE,
804
808
  0,
805
809
  [_sta, _tr, _aT, _rep, _sa, _pl, _inte, _l, _too, _end],
@@ -31,6 +31,10 @@ export const VoiceCallToolPhase = {
31
31
  FINISHED: "finished",
32
32
  STARTED: "started",
33
33
  };
34
+ export const VoiceTranscriptionDropReason = {
35
+ LOW_CONFIDENCE: "low_confidence",
36
+ OTHER_SPEAKER: "other_speaker",
37
+ };
34
38
  export const VoiceAudioEncoding = {
35
39
  ALAW: "alaw",
36
40
  MULAW: "mulaw",
@@ -159,6 +159,7 @@ const _dN = "dialedNumber";
159
159
  const _dVD = "duckVolumeDb";
160
160
  const _di = "digits";
161
161
  const _dr = "draft";
162
+ const _dro = "dropped";
162
163
  const _dt = "dtmf";
163
164
  const _du = "duck";
164
165
  const _e = "error";
@@ -200,6 +201,7 @@ const _m = "message";
200
201
  const _mC = "minConfidence";
201
202
  const _mT = "mediaType";
202
203
  const _mW = "minWords";
204
+ const _mWM = "maxWaitMs";
203
205
  const _me = "media";
204
206
  const _met = "metadata";
205
207
  const _n = "name";
@@ -226,9 +228,10 @@ const _rAMe = "restoreAfterMs";
226
228
  const _rI = "replyId";
227
229
  const _rM = "rampMs";
228
230
  const _rWE = "replyWebsocketEvent";
229
- const _re = "restore";
231
+ const _re = "recogniser";
230
232
  const _rep = "reply";
231
- const _res = "resume";
233
+ const _res = "restore";
234
+ const _resu = "resume";
232
235
  const _ret = "retryable";
233
236
  const _s = "smithy.ts.sdk.synthetic.wildix.wilma.voice";
234
237
  const _sEWE = "sessionEndedWebsocketEvent";
@@ -374,8 +377,8 @@ export var GetVoiceDefaultsInput$ = [3, n1, _GVDI,
374
377
  ];
375
378
  export var GetVoiceDefaultsOutput$ = [3, n1, _GVDO,
376
379
  0,
377
- [_vD, _in, _tE],
378
- [() => VoiceDetectionDefaults$, () => VoiceInterruptionDefaults$, () => VoiceTurnEndDefaults$], 3
380
+ [_re, _vD, _in, _tE],
381
+ [0, () => VoiceDetectionDefaults$, () => VoiceInterruptionDefaults$, () => VoiceTurnEndDefaults$], 4
379
382
  ];
380
383
  export var HangupCommandData$ = [3, n1, _HCD,
381
384
  0,
@@ -424,7 +427,7 @@ export var MediaAudioFormat$ = [3, n1, _MAF,
424
427
  ];
425
428
  export var MediaCloudFrames$ = [3, n1, _MCF,
426
429
  0,
427
- [_sta, _tr, _aB, _au, _aE, _sto, _du, _re, _l, _tra, _h, _e, _fi],
430
+ [_sta, _tr, _aB, _au, _aE, _sto, _du, _res, _l, _tra, _h, _e, _fi],
428
431
  [() => MediaStartedFrame$, () => MediaTranscriptionFrame$, () => MediaAudioBeginFrame$, 21, () => MediaAudioEndFrame$, () => MediaStopFrame$, () => MediaDuckFrame$, () => MediaRestoreFrame$, () => MediaLanguageFrame$, () => MediaTransferFrame$, () => MediaHangupFrame$, () => MediaErrorFrame$, () => MediaFinishedFrame$]
429
432
  ];
430
433
  export var MediaDtmfFrame$ = [3, n1, _MDF,
@@ -504,7 +507,7 @@ export var MediaStartedFrame$ = [3, n1, _MSF,
504
507
  ];
505
508
  export var MediaStartFrame$ = [3, n1, _MSFe,
506
509
  0,
507
- [_t, _pu, _cI, _fI, _sIe, _res, _rAM, _au, _cal, _ag, _la, _pL, _aD, _dN, _var],
510
+ [_t, _pu, _cI, _fI, _sIe, _resu, _rAM, _au, _cal, _ag, _la, _pL, _aD, _dN, _var],
508
511
  [0, 0, 0, 1, 0, 2, 1, () => MediaAudioFormat$, () => MediaStartCaller$, () => MediaStartAgent$, 64 | 0, 0, 2, 0, 0], 9
509
512
  ];
510
513
  export var MediaStopFrame$ = [3, n1, _MSFed,
@@ -754,8 +757,8 @@ export var VoiceCallToolEvent$ = [3, n1, _VCTE,
754
757
  ];
755
758
  export var VoiceCallTranscriptionEvent$ = [3, n1, _VCTEo,
756
759
  0,
757
- [_i, _te, _f, _l, _ti],
758
- [0, 0, 2, 0, 1], 3
760
+ [_i, _te, _f, _l, _ti, _dro],
761
+ [0, 0, 2, 0, 1, 0], 3
759
762
  ];
760
763
  export var VoiceConnectParams$ = [3, n1, _VCP,
761
764
  0,
@@ -784,8 +787,8 @@ export var VoiceSpeechPayload$ = [3, n1, _VSP,
784
787
  ];
785
788
  export var VoiceTurnEndDefaults$ = [3, n1, _VTED,
786
789
  0,
787
- [_hM],
788
- [1], 1
790
+ [_hM, _mWM],
791
+ [128 | 1, 1], 2
789
792
  ];
790
793
  var LanguageCodeList = 64 | 0;
791
794
  var VoicePronunciationList = [1, n2, _VPL,
@@ -795,6 +798,7 @@ var MediaStartLanguageList = 64 | 0;
795
798
  var VoiceList = [1, n1, _VL,
796
799
  0, () => Voice$
797
800
  ];
801
+ var VoiceHoldByRecogniser = 128 | 1;
798
802
  export var VoiceCallEvent$ = [4, n1, _VCE,
799
803
  0,
800
804
  [_sta, _tr, _aT, _rep, _sa, _pl, _inte, _l, _too, _end],
@@ -259,6 +259,7 @@ declare const DescribeVoiceProtocolCommand_base: {
259
259
  * // final: true || false, // required
260
260
  * // language: "STRING_VALUE",
261
261
  * // time: Number("long"),
262
+ * // dropped: "low_confidence" || "other_speaker",
262
263
  * // },
263
264
  * // agentTranscription: { // VoiceCallAgentTranscriptionEvent
264
265
  * // id: "STRING_VALUE", // required
@@ -40,6 +40,7 @@ declare const GetVoiceDefaultsCommand_base: {
40
40
  * const command = new GetVoiceDefaultsCommand(input);
41
41
  * const response = await client.send(command);
42
42
  * // { // GetVoiceDefaultsOutput
43
+ * // recogniser: "STRING_VALUE", // required
43
44
  * // voiceDetection: { // VoiceDetectionDefaults
44
45
  * // silenceMs: Number("int"), // required
45
46
  * // silenceLevelDb: Number("int"), // required
@@ -53,7 +54,10 @@ declare const GetVoiceDefaultsCommand_base: {
53
54
  * // restoreAfterMs: Number("int"), // required
54
55
  * // },
55
56
  * // turnEnd: { // VoiceTurnEndDefaults
56
- * // holdMs: Number("int"), // required
57
+ * // holdMs: { // VoiceHoldByRecogniser // required
58
+ * // "<keys>": Number("int"),
59
+ * // },
60
+ * // maxWaitMs: Number("int"), // required
57
61
  * // },
58
62
  * // };
59
63
  *
@@ -86,6 +86,24 @@ export declare const VoiceCallToolPhase: {
86
86
  * @public
87
87
  */
88
88
  export type VoiceCallToolPhase = (typeof VoiceCallToolPhase)[keyof typeof VoiceCallToolPhase];
89
+ /**
90
+ * @public
91
+ * @enum
92
+ */
93
+ export declare const VoiceTranscriptionDropReason: {
94
+ /**
95
+ * The recognition confidence was below the minimum confidence of the call.
96
+ */
97
+ readonly LOW_CONFIDENCE: "low_confidence";
98
+ /**
99
+ * The recogniser labelled the words with a speaker other than the caller.
100
+ */
101
+ readonly OTHER_SPEAKER: "other_speaker";
102
+ };
103
+ /**
104
+ * @public
105
+ */
106
+ export type VoiceTranscriptionDropReason = (typeof VoiceTranscriptionDropReason)[keyof typeof VoiceTranscriptionDropReason];
89
107
  /**
90
108
  * @public
91
109
  * @enum
@@ -1,5 +1,5 @@
1
1
  import type { DocumentType as __DocumentType, StreamingBlobTypes } from "@smithy/types";
2
- import type { MediaAudioBeginFrameType, MediaAudioEncoding, MediaAudioEndFrameType, MediaDtmfFrameType, MediaDuckFrameType, MediaErrorFrameType, MediaFinishedFrameType, MediaFinishFrameType, MediaFinishReason, MediaHangupFrameType, MediaLanguageFrameType, MediaParty, MediaPlaybackEvent, MediaPlaybackFrameType, MediaPlaybackStopCause, MediaRestoreFrameType, MediaRunPurpose, MediaStartedFrameType, MediaStartFrameType, MediaStopFrameType, MediaTranscriptionFrameType, MediaTransferFrameType, MediaVadFrameType, VoiceAudioEncoding, VoiceCallEndReason, VoiceCallToolPhase, VoiceCommandType, VoiceControlAction, VoiceEventType, VoiceInputMode, VoicePronunciationEncoding } from "./enums";
2
+ import type { MediaAudioBeginFrameType, MediaAudioEncoding, MediaAudioEndFrameType, MediaDtmfFrameType, MediaDuckFrameType, MediaErrorFrameType, MediaFinishedFrameType, MediaFinishFrameType, MediaFinishReason, MediaHangupFrameType, MediaLanguageFrameType, MediaParty, MediaPlaybackEvent, MediaPlaybackFrameType, MediaPlaybackStopCause, MediaRestoreFrameType, MediaRunPurpose, MediaStartedFrameType, MediaStartFrameType, MediaStopFrameType, MediaTranscriptionFrameType, MediaTransferFrameType, MediaVadFrameType, VoiceAudioEncoding, VoiceCallEndReason, VoiceCallToolPhase, VoiceCommandType, VoiceControlAction, VoiceEventType, VoiceInputMode, VoicePronunciationEncoding, VoiceTranscriptionDropReason } from "./enums";
3
3
  /**
4
4
  * A pronunciation rule for one phrase. Belongs to a LANGUAGE, not to the agent: 'Wildix' is
5
5
  * respelled differently for an Italian and a German voice, so one list shared ACROSS languages
@@ -351,6 +351,11 @@ export interface VoiceCallTranscriptionEvent {
351
351
  * @public
352
352
  */
353
353
  time?: number | undefined;
354
+ /**
355
+ * Present on a final that did not go to the agent as a caller turn. It came while the agent spoke and the cloud took it for noise or echo, or for another speaker.
356
+ * @public
357
+ */
358
+ dropped?: VoiceTranscriptionDropReason | undefined;
354
359
  }
355
360
  /**
356
361
  * One event on a live call. The SSE frame's `event:` is the member name and `data:` this whole union document, so a frame reads `data: \{"say": \{...\}\}` — never the member's payload on its own.
@@ -1901,10 +1906,15 @@ export interface VoiceInterruptionDefaults {
1901
1906
  */
1902
1907
  export interface VoiceTurnEndDefaults {
1903
1908
  /**
1904
- * Wait in ms after the recogniser marks the end of a caller phrase, before the agent answers.
1909
+ * Default of `holdMs` for each recogniser, by the URI scheme of the recogniser, for example `soniox` and `aws`.
1905
1910
  * @public
1906
1911
  */
1907
- holdMs: number;
1912
+ holdMs: Record<string, number>;
1913
+ /**
1914
+ * Default of `maxWaitMs`.
1915
+ * @public
1916
+ */
1917
+ maxWaitMs: number;
1908
1918
  }
1909
1919
  /**
1910
1920
  * Defaults of `VoiceChannelSettings.voiceDetection`.
@@ -1931,6 +1941,11 @@ export interface VoiceDetectionDefaults {
1931
1941
  * @public
1932
1942
  */
1933
1943
  export interface GetVoiceDefaultsOutput {
1944
+ /**
1945
+ * URI scheme of the recogniser that a call uses when its agent sets none, for example `soniox`.
1946
+ * @public
1947
+ */
1948
+ recogniser: string;
1934
1949
  /**
1935
1950
  * Defaults of `VoiceChannelSettings.voiceDetection`.
1936
1951
  * @public
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/wilma-voice-client",
3
3
  "description": "@wildix/wilma-voice-client client",
4
- "version": "0.0.41",
4
+ "version": "0.0.43",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",