@wildix/wilma-voice-client 0.0.44 → 0.0.46

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,10 +1,15 @@
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.VoiceTranscriptionDropReason = 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.VoiceLowConfidenceAction = exports.VoicePronunciationEncoding = void 0;
4
4
  exports.VoicePronunciationEncoding = {
5
5
  ALIAS: "alias",
6
6
  IPA: "ipa",
7
7
  };
8
+ exports.VoiceLowConfidenceAction = {
9
+ ANSWER: "answer",
10
+ ASK_TO_REPEAT: "ask_to_repeat",
11
+ SKIP: "skip",
12
+ };
8
13
  exports.VoiceEventType = {
9
14
  AGENT_TRANSCRIPTION: "agentTranscription",
10
15
  AUDIO: "audio",
@@ -201,6 +201,7 @@ const _in = "interruptions";
201
201
  const _int = "interruptible";
202
202
  const _inte = "interruption";
203
203
  const _l = "language";
204
+ const _lC = "lowConfidence";
204
205
  const _la = "languages";
205
206
  const _m = "message";
206
207
  const _mC = "minConfidence";
@@ -781,8 +782,8 @@ exports.VoiceErrorEvent$ = [3, n1, _VEE,
781
782
  ];
782
783
  exports.VoiceInterruptionDefaults$ = [3, n1, _VID,
783
784
  0,
784
- [_mW, _mC, _dAM, _dVD, _rAMe],
785
- [1, 1, 1, 1, 1], 5
785
+ [_mW, _dAM, _dVD, _rAMe],
786
+ [1, 1, 1, 1], 4
786
787
  ];
787
788
  exports.VoiceSpeechPayload$ = [3, n1, _VSP,
788
789
  0,
@@ -791,8 +792,8 @@ exports.VoiceSpeechPayload$ = [3, n1, _VSP,
791
792
  ];
792
793
  exports.VoiceTurnEndDefaults$ = [3, n1, _VTED,
793
794
  0,
794
- [_hM, _mWM],
795
- [1, 1], 2
795
+ [_hM, _mWM, _mC, _lC],
796
+ [1, 1, 1, 0], 4
796
797
  ];
797
798
  var LanguageCodeList = 64 | 0;
798
799
  var VoicePronunciationList = [1, n2, _VPL,
@@ -2,6 +2,11 @@ export const VoicePronunciationEncoding = {
2
2
  ALIAS: "alias",
3
3
  IPA: "ipa",
4
4
  };
5
+ export const VoiceLowConfidenceAction = {
6
+ ANSWER: "answer",
7
+ ASK_TO_REPEAT: "ask_to_repeat",
8
+ SKIP: "skip",
9
+ };
5
10
  export const VoiceEventType = {
6
11
  AGENT_TRANSCRIPTION: "agentTranscription",
7
12
  AUDIO: "audio",
@@ -196,6 +196,7 @@ const _in = "interruptions";
196
196
  const _int = "interruptible";
197
197
  const _inte = "interruption";
198
198
  const _l = "language";
199
+ const _lC = "lowConfidence";
199
200
  const _la = "languages";
200
201
  const _m = "message";
201
202
  const _mC = "minConfidence";
@@ -776,8 +777,8 @@ export var VoiceErrorEvent$ = [3, n1, _VEE,
776
777
  ];
777
778
  export var VoiceInterruptionDefaults$ = [3, n1, _VID,
778
779
  0,
779
- [_mW, _mC, _dAM, _dVD, _rAMe],
780
- [1, 1, 1, 1, 1], 5
780
+ [_mW, _dAM, _dVD, _rAMe],
781
+ [1, 1, 1, 1], 4
781
782
  ];
782
783
  export var VoiceSpeechPayload$ = [3, n1, _VSP,
783
784
  0,
@@ -786,8 +787,8 @@ export var VoiceSpeechPayload$ = [3, n1, _VSP,
786
787
  ];
787
788
  export var VoiceTurnEndDefaults$ = [3, n1, _VTED,
788
789
  0,
789
- [_hM, _mWM],
790
- [1, 1], 2
790
+ [_hM, _mWM, _mC, _lC],
791
+ [1, 1, 1, 0], 4
791
792
  ];
792
793
  var LanguageCodeList = 64 | 0;
793
794
  var VoicePronunciationList = [1, n2, _VPL,
@@ -47,7 +47,6 @@ declare const GetVoiceDefaultsCommand_base: {
47
47
  * // },
48
48
  * // interruptions: { // VoiceInterruptionDefaults
49
49
  * // minWords: Number("int"), // required
50
- * // minConfidence: Number("double"), // required
51
50
  * // duckAfterMs: Number("int"), // required
52
51
  * // duckVolumeDb: Number("int"), // required
53
52
  * // restoreAfterMs: Number("int"), // required
@@ -55,6 +54,8 @@ declare const GetVoiceDefaultsCommand_base: {
55
54
  * // turnEnd: { // VoiceTurnEndDefaults
56
55
  * // holdMs: Number("int"), // required
57
56
  * // maxWaitMs: Number("int"), // required
57
+ * // minConfidence: Number("double"), // required
58
+ * // lowConfidence: "answer" || "ask_to_repeat" || "skip", // required
58
59
  * // },
59
60
  * // };
60
61
  *
@@ -16,6 +16,28 @@ export declare const VoicePronunciationEncoding: {
16
16
  * @public
17
17
  */
18
18
  export type VoicePronunciationEncoding = (typeof VoicePronunciationEncoding)[keyof typeof VoicePronunciationEncoding];
19
+ /**
20
+ * @public
21
+ * @enum
22
+ */
23
+ export declare const VoiceLowConfidenceAction: {
24
+ /**
25
+ * The agent answers the words as they were recognised.
26
+ */
27
+ readonly ANSWER: "answer";
28
+ /**
29
+ * The agent asks the caller to repeat.
30
+ */
31
+ readonly ASK_TO_REPEAT: "ask_to_repeat";
32
+ /**
33
+ * The agent does not answer the turn.
34
+ */
35
+ readonly SKIP: "skip";
36
+ };
37
+ /**
38
+ * @public
39
+ */
40
+ export type VoiceLowConfidenceAction = (typeof VoiceLowConfidenceAction)[keyof typeof VoiceLowConfidenceAction];
19
41
  /**
20
42
  * @public
21
43
  * @enum
@@ -435,7 +457,7 @@ export declare const MediaRunPurpose: {
435
457
  */
436
458
  readonly AGENT: "agent";
437
459
  /**
438
- * The cloud transcribes the call and sends no audio.
460
+ * Reserved: the cloud transcribes the call and sends no audio. The cloud does not serve it at this time and closes the socket with 4400.
439
461
  */
440
462
  readonly TRANSCRIPTION: "transcription";
441
463
  };
@@ -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, VoiceTranscriptionDropReason } 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, VoiceLowConfidenceAction, 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
@@ -352,7 +352,7 @@ export interface VoiceCallTranscriptionEvent {
352
352
  */
353
353
  time?: number | undefined;
354
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.
355
+ * Present on a final that did not go to the agent as a caller turn. It came while the agent spoke, and its recognition confidence was below the minimum of the call or the recogniser labelled it with another speaker.
356
356
  * @public
357
357
  */
358
358
  dropped?: VoiceTranscriptionDropReason | undefined;
@@ -900,7 +900,7 @@ export interface MediaVoiceDetection {
900
900
  */
901
901
  silenceMs: number;
902
902
  /**
903
- * Level in dBFS below which caller audio is silence.
903
+ * Mean frame level in dBFS below which caller audio is silence.
904
904
  * @public
905
905
  */
906
906
  silenceLevelDb: number;
@@ -1163,7 +1163,7 @@ export interface MediaStartAgent {
1163
1163
  version?: number | undefined;
1164
1164
  }
1165
1165
  /**
1166
- * Format of the binary PBX audio (`MediaPbxAudio`). Channel 0 is the caller; channel 1, when present, is the callee. Samples interleave.
1166
+ * Format of the binary PBX audio (`MediaPbxAudio`). Channel 0 is the caller; channel 1, when present, is the callee. Samples interleave. The cloud accepts only 8000 Hz and one channel at this time; another format closes the socket with 4400.
1167
1167
  * @public
1168
1168
  */
1169
1169
  export interface MediaAudioFormat {
@@ -1220,7 +1220,7 @@ export interface MediaStartFrame {
1220
1220
  */
1221
1221
  sessionId: string;
1222
1222
  /**
1223
- * True when an earlier connection of this run got `started`: the cloud continues that session without a new greeting.
1223
+ * True when an earlier connection of this run got agent audio (`audio.begin`): the cloud continues that session without a new greeting.
1224
1224
  * @public
1225
1225
  */
1226
1226
  resume: boolean;
@@ -1230,7 +1230,7 @@ export interface MediaStartFrame {
1230
1230
  */
1231
1231
  resumeAtMs: number;
1232
1232
  /**
1233
- * Format of the binary PBX audio (`MediaPbxAudio`). Channel 0 is the caller; channel 1, when present, is the callee. Samples interleave.
1233
+ * Format of the binary PBX audio (`MediaPbxAudio`). Channel 0 is the caller; channel 1, when present, is the callee. Samples interleave. The cloud accepts only 8000 Hz and one channel at this time; another format closes the socket with 4400.
1234
1234
  * @public
1235
1235
  */
1236
1236
  audio: MediaAudioFormat;
@@ -1879,11 +1879,6 @@ export interface VoiceInterruptionDefaults {
1879
1879
  * @public
1880
1880
  */
1881
1881
  minWords: number;
1882
- /**
1883
- * Minimum recognition confidence, from 0 to 1, of the caller words that count as an interruption.
1884
- * @public
1885
- */
1886
- minConfidence: number;
1887
1882
  /**
1888
1883
  * Caller speech in ms before the agent's reply is lowered.
1889
1884
  * @public
@@ -1915,6 +1910,16 @@ export interface VoiceTurnEndDefaults {
1915
1910
  * @public
1916
1911
  */
1917
1912
  maxWaitMs: number;
1913
+ /**
1914
+ * Default of `minConfidence`. 0: off.
1915
+ * @public
1916
+ */
1917
+ minConfidence: number;
1918
+ /**
1919
+ * Default of `lowConfidence`.
1920
+ * @public
1921
+ */
1922
+ lowConfidence: VoiceLowConfidenceAction;
1918
1923
  }
1919
1924
  /**
1920
1925
  * Defaults of `VoiceChannelSettings.voiceDetection`.
@@ -1927,7 +1932,7 @@ export interface VoiceDetectionDefaults {
1927
1932
  */
1928
1933
  silenceMs: number;
1929
1934
  /**
1930
- * Level in dBFS below which caller audio is silence.
1935
+ * Mean frame level in dBFS below which caller audio is silence.
1931
1936
  * @public
1932
1937
  */
1933
1938
  silenceLevelDb: number;
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.44",
4
+ "version": "0.0.46",
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",