@wildix/wilma-voice-client 0.0.40 → 0.0.41
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.
- package/dist-cjs/WilmaVoice.js +2 -0
- package/dist-cjs/commands/GetVoiceDefaultsCommand.js +20 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/enums.js +80 -1
- package/dist-cjs/schemas/schemas_0.js +274 -40
- package/dist-es/WilmaVoice.js +2 -0
- package/dist-es/commands/GetVoiceDefaultsCommand.js +16 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/enums.js +79 -0
- package/dist-es/schemas/schemas_0.js +271 -38
- package/dist-types/WilmaVoice.d.ts +15 -5
- package/dist-types/WilmaVoiceClient.d.ts +10 -7
- package/dist-types/commands/DescribeVoiceProtocolCommand.d.ts +136 -1
- package/dist-types/commands/GetVoiceDefaultsCommand.d.ts +90 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/index.d.ts +7 -5
- package/dist-types/models/enums.d.ts +302 -0
- package/dist-types/models/models_0.d.ts +676 -3
- package/dist-types/schemas/schemas_0.d.ts +31 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DocumentType as __DocumentType, StreamingBlobTypes } from "@smithy/types";
|
|
2
|
-
import type { 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 } 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
|
|
@@ -764,6 +764,586 @@ export interface InterruptionWebsocketEvent {
|
|
|
764
764
|
*/
|
|
765
765
|
event: InterruptionEvent;
|
|
766
766
|
}
|
|
767
|
+
/**
|
|
768
|
+
* Opens an agent audio stream. `MediaCloudAudio` messages of the stream follow until `audio.end`. Streams do not interleave.
|
|
769
|
+
* @public
|
|
770
|
+
*/
|
|
771
|
+
export interface MediaAudioBeginFrame {
|
|
772
|
+
type: MediaAudioBeginFrameType;
|
|
773
|
+
/**
|
|
774
|
+
* Id of a reply, a stream, an utterance or a DTMF input, unique in the run.
|
|
775
|
+
* @public
|
|
776
|
+
*/
|
|
777
|
+
replyId: string;
|
|
778
|
+
/**
|
|
779
|
+
* Id of a reply, a stream, an utterance or a DTMF input, unique in the run.
|
|
780
|
+
* @public
|
|
781
|
+
*/
|
|
782
|
+
streamId: string;
|
|
783
|
+
/**
|
|
784
|
+
* Sample rate of the stream's `pcm_s16le` mono audio in Hz: 8000, 16000, 22050 or 24000.
|
|
785
|
+
* @public
|
|
786
|
+
*/
|
|
787
|
+
sampleRate: number;
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Closes an agent audio stream.
|
|
791
|
+
* @public
|
|
792
|
+
*/
|
|
793
|
+
export interface MediaAudioEndFrame {
|
|
794
|
+
type: MediaAudioEndFrameType;
|
|
795
|
+
/**
|
|
796
|
+
* Id of a reply, a stream, an utterance or a DTMF input, unique in the run.
|
|
797
|
+
* @public
|
|
798
|
+
*/
|
|
799
|
+
streamId: string;
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Lower the volume of a playing reply.
|
|
803
|
+
* @public
|
|
804
|
+
*/
|
|
805
|
+
export interface MediaDuckFrame {
|
|
806
|
+
type: MediaDuckFrameType;
|
|
807
|
+
/**
|
|
808
|
+
* Id of a reply, a stream, an utterance or a DTMF input, unique in the run.
|
|
809
|
+
* @public
|
|
810
|
+
*/
|
|
811
|
+
replyId: string;
|
|
812
|
+
/**
|
|
813
|
+
* Target gain in dB.
|
|
814
|
+
* @public
|
|
815
|
+
*/
|
|
816
|
+
volumeDb: number;
|
|
817
|
+
/**
|
|
818
|
+
* Ramp duration in ms.
|
|
819
|
+
* @public
|
|
820
|
+
*/
|
|
821
|
+
rampMs: number;
|
|
822
|
+
}
|
|
823
|
+
/**
|
|
824
|
+
* An error on the run. When `retryable` is false, the socket closes after it.
|
|
825
|
+
* @public
|
|
826
|
+
*/
|
|
827
|
+
export interface MediaErrorFrame {
|
|
828
|
+
type: MediaErrorFrameType;
|
|
829
|
+
/**
|
|
830
|
+
* Stable error code, for example `START_TIMEOUT`, `PROTOCOL_ERROR` or `STT_FAILED`.
|
|
831
|
+
* @public
|
|
832
|
+
*/
|
|
833
|
+
code: string;
|
|
834
|
+
retryable: boolean;
|
|
835
|
+
message: string;
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* Answer to `finish`: the cloud processed all audio. The socket closes with 1000 after it.
|
|
839
|
+
* @public
|
|
840
|
+
*/
|
|
841
|
+
export interface MediaFinishedFrame {
|
|
842
|
+
type: MediaFinishedFrameType;
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* Hang up the call after the queued agent audio plays. Terminal: the PBX answers with `finish`.
|
|
846
|
+
* @public
|
|
847
|
+
*/
|
|
848
|
+
export interface MediaHangupFrame {
|
|
849
|
+
type: MediaHangupFrameType;
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* The call continues in another language.
|
|
853
|
+
* @public
|
|
854
|
+
*/
|
|
855
|
+
export interface MediaLanguageFrame {
|
|
856
|
+
type: MediaLanguageFrameType;
|
|
857
|
+
/**
|
|
858
|
+
* Language that the call continues in.
|
|
859
|
+
* @public
|
|
860
|
+
*/
|
|
861
|
+
language: string;
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* Return a reply to full volume.
|
|
865
|
+
* @public
|
|
866
|
+
*/
|
|
867
|
+
export interface MediaRestoreFrame {
|
|
868
|
+
type: MediaRestoreFrameType;
|
|
869
|
+
/**
|
|
870
|
+
* Id of a reply, a stream, an utterance or a DTMF input, unique in the run.
|
|
871
|
+
* @public
|
|
872
|
+
*/
|
|
873
|
+
replyId: string;
|
|
874
|
+
/**
|
|
875
|
+
* Ramp duration in ms.
|
|
876
|
+
* @public
|
|
877
|
+
*/
|
|
878
|
+
rampMs: number;
|
|
879
|
+
}
|
|
880
|
+
/**
|
|
881
|
+
* The agent that answers the run.
|
|
882
|
+
* @public
|
|
883
|
+
*/
|
|
884
|
+
export interface MediaStartedAgent {
|
|
885
|
+
name: string;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Caller voice detection of a run, with every value resolved.
|
|
889
|
+
* @public
|
|
890
|
+
*/
|
|
891
|
+
export interface MediaVoiceDetection {
|
|
892
|
+
/**
|
|
893
|
+
* Silence in ms that ends the caller speech.
|
|
894
|
+
* @public
|
|
895
|
+
*/
|
|
896
|
+
silenceMs: number;
|
|
897
|
+
/**
|
|
898
|
+
* Level in dBFS below which caller audio is silence.
|
|
899
|
+
* @public
|
|
900
|
+
*/
|
|
901
|
+
silenceLevelDb: number;
|
|
902
|
+
/**
|
|
903
|
+
* Mean frame level in dBFS from which caller audio is speech.
|
|
904
|
+
* @public
|
|
905
|
+
*/
|
|
906
|
+
speechLevelDb: number;
|
|
907
|
+
}
|
|
908
|
+
/**
|
|
909
|
+
* The cloud accepted `start`. Sent once per connection.
|
|
910
|
+
* @public
|
|
911
|
+
*/
|
|
912
|
+
export interface MediaStartedFrame {
|
|
913
|
+
type: MediaStartedFrameType;
|
|
914
|
+
/**
|
|
915
|
+
* Id of the cloud stream of this run. Cloud logs carry it; use it to match PBX and cloud logs.
|
|
916
|
+
* @public
|
|
917
|
+
*/
|
|
918
|
+
streamId: string;
|
|
919
|
+
/**
|
|
920
|
+
* Present when the run purpose is `agent`.
|
|
921
|
+
* @public
|
|
922
|
+
*/
|
|
923
|
+
agent?: MediaStartedAgent | undefined;
|
|
924
|
+
/**
|
|
925
|
+
* Group of the agent. Absent when the agent has none.
|
|
926
|
+
* @public
|
|
927
|
+
*/
|
|
928
|
+
groupId?: string | undefined;
|
|
929
|
+
/**
|
|
930
|
+
* Music-on-hold class that the PBX plays after each caller turn until agent audio starts. Absent: none.
|
|
931
|
+
* @public
|
|
932
|
+
*/
|
|
933
|
+
backgroundSound?: string | undefined;
|
|
934
|
+
/**
|
|
935
|
+
* Caller voice detection that the PBX uses for the `vad` frames of this run. Absent: the PBX keeps its defaults.
|
|
936
|
+
* @public
|
|
937
|
+
*/
|
|
938
|
+
voiceDetection?: MediaVoiceDetection | undefined;
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Stop every agent audio stream of the run: the one that plays and the ones that wait.
|
|
942
|
+
* @public
|
|
943
|
+
*/
|
|
944
|
+
export interface MediaStopFrame {
|
|
945
|
+
type: MediaStopFrameType;
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Words of one party. Partials and the final of one utterance share `id`. For the agent, the words that played.
|
|
949
|
+
* @public
|
|
950
|
+
*/
|
|
951
|
+
export interface MediaTranscriptionFrame {
|
|
952
|
+
type: MediaTranscriptionFrameType;
|
|
953
|
+
/**
|
|
954
|
+
* Party that spoke. The agent's own words are `callee`.
|
|
955
|
+
* @public
|
|
956
|
+
*/
|
|
957
|
+
party: MediaParty;
|
|
958
|
+
/**
|
|
959
|
+
* Id of a reply, a stream, an utterance or a DTMF input, unique in the run.
|
|
960
|
+
* @public
|
|
961
|
+
*/
|
|
962
|
+
id: string;
|
|
963
|
+
final: boolean;
|
|
964
|
+
text: string;
|
|
965
|
+
/**
|
|
966
|
+
* Run-clock time or duration in ms of PBX audio since the run started. It continues across reconnects.
|
|
967
|
+
* @public
|
|
968
|
+
*/
|
|
969
|
+
startMs: number;
|
|
970
|
+
/**
|
|
971
|
+
* Run-clock time or duration in ms of PBX audio since the run started. It continues across reconnects.
|
|
972
|
+
* @public
|
|
973
|
+
*/
|
|
974
|
+
endMs: number;
|
|
975
|
+
/**
|
|
976
|
+
* BCP-47 language tag, optionally with a region subtag: 'en', 'en-US', 'pt-BR'. Deliberately a
|
|
977
|
+
* constrained string rather than an enum: the offerable set is a property of the selected
|
|
978
|
+
* recogniser and changes with it, so an enumeration here would cap the set at whatever was known
|
|
979
|
+
* when the model was released.
|
|
980
|
+
* @public
|
|
981
|
+
*/
|
|
982
|
+
language: string;
|
|
983
|
+
/**
|
|
984
|
+
* Recogniser confidence from 0 to 1. Absent when the text is not from a recogniser, or the engine gives none.
|
|
985
|
+
* @public
|
|
986
|
+
*/
|
|
987
|
+
confidence?: number | undefined;
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* Transfer the call after the queued agent audio plays. Terminal: the PBX answers with `finish`.
|
|
991
|
+
* @public
|
|
992
|
+
*/
|
|
993
|
+
export interface MediaTransferFrame {
|
|
994
|
+
type: MediaTransferFrameType;
|
|
995
|
+
/**
|
|
996
|
+
* Dialplan context of the target.
|
|
997
|
+
* @public
|
|
998
|
+
*/
|
|
999
|
+
context: string;
|
|
1000
|
+
/**
|
|
1001
|
+
* Extension of the target.
|
|
1002
|
+
* @public
|
|
1003
|
+
*/
|
|
1004
|
+
extension: string;
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* One example of each message that the cloud sends.
|
|
1008
|
+
* @public
|
|
1009
|
+
*/
|
|
1010
|
+
export interface MediaCloudFrames {
|
|
1011
|
+
/**
|
|
1012
|
+
* The cloud accepted `start`. Sent once per connection.
|
|
1013
|
+
* @public
|
|
1014
|
+
*/
|
|
1015
|
+
started?: MediaStartedFrame | undefined;
|
|
1016
|
+
/**
|
|
1017
|
+
* Words of one party. Partials and the final of one utterance share `id`. For the agent, the words that played.
|
|
1018
|
+
* @public
|
|
1019
|
+
*/
|
|
1020
|
+
transcription?: MediaTranscriptionFrame | undefined;
|
|
1021
|
+
/**
|
|
1022
|
+
* Opens an agent audio stream. `MediaCloudAudio` messages of the stream follow until `audio.end`. Streams do not interleave.
|
|
1023
|
+
* @public
|
|
1024
|
+
*/
|
|
1025
|
+
audioBegin?: MediaAudioBeginFrame | undefined;
|
|
1026
|
+
/**
|
|
1027
|
+
* One binary audio message. In the describe answer it is base64; on the socket it is raw bytes.
|
|
1028
|
+
* @public
|
|
1029
|
+
*/
|
|
1030
|
+
audio?: Uint8Array | undefined;
|
|
1031
|
+
/**
|
|
1032
|
+
* Closes an agent audio stream.
|
|
1033
|
+
* @public
|
|
1034
|
+
*/
|
|
1035
|
+
audioEnd?: MediaAudioEndFrame | undefined;
|
|
1036
|
+
/**
|
|
1037
|
+
* Stop every agent audio stream of the run: the one that plays and the ones that wait.
|
|
1038
|
+
* @public
|
|
1039
|
+
*/
|
|
1040
|
+
stop?: MediaStopFrame | undefined;
|
|
1041
|
+
/**
|
|
1042
|
+
* Lower the volume of a playing reply.
|
|
1043
|
+
* @public
|
|
1044
|
+
*/
|
|
1045
|
+
duck?: MediaDuckFrame | undefined;
|
|
1046
|
+
/**
|
|
1047
|
+
* Return a reply to full volume.
|
|
1048
|
+
* @public
|
|
1049
|
+
*/
|
|
1050
|
+
restore?: MediaRestoreFrame | undefined;
|
|
1051
|
+
/**
|
|
1052
|
+
* The call continues in another language.
|
|
1053
|
+
* @public
|
|
1054
|
+
*/
|
|
1055
|
+
language?: MediaLanguageFrame | undefined;
|
|
1056
|
+
/**
|
|
1057
|
+
* Transfer the call after the queued agent audio plays. Terminal: the PBX answers with `finish`.
|
|
1058
|
+
* @public
|
|
1059
|
+
*/
|
|
1060
|
+
transfer?: MediaTransferFrame | undefined;
|
|
1061
|
+
/**
|
|
1062
|
+
* Hang up the call after the queued agent audio plays. Terminal: the PBX answers with `finish`.
|
|
1063
|
+
* @public
|
|
1064
|
+
*/
|
|
1065
|
+
hangup?: MediaHangupFrame | undefined;
|
|
1066
|
+
/**
|
|
1067
|
+
* An error on the run. When `retryable` is false, the socket closes after it.
|
|
1068
|
+
* @public
|
|
1069
|
+
*/
|
|
1070
|
+
error?: MediaErrorFrame | undefined;
|
|
1071
|
+
/**
|
|
1072
|
+
* Answer to `finish`: the cloud processed all audio. The socket closes with 1000 after it.
|
|
1073
|
+
* @public
|
|
1074
|
+
*/
|
|
1075
|
+
finished?: MediaFinishedFrame | undefined;
|
|
1076
|
+
}
|
|
1077
|
+
/**
|
|
1078
|
+
* DTMF input that the PBX collected. The cloud takes `digits` as the caller's reply.
|
|
1079
|
+
* @public
|
|
1080
|
+
*/
|
|
1081
|
+
export interface MediaDtmfFrame {
|
|
1082
|
+
type: MediaDtmfFrameType;
|
|
1083
|
+
/**
|
|
1084
|
+
* Id of a reply, a stream, an utterance or a DTMF input, unique in the run.
|
|
1085
|
+
* @public
|
|
1086
|
+
*/
|
|
1087
|
+
id: string;
|
|
1088
|
+
digits: string;
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* The run ended on the PBX. The PBX sends no audio after it and waits up to 3 s for `finished`.
|
|
1092
|
+
* @public
|
|
1093
|
+
*/
|
|
1094
|
+
export interface MediaFinishFrame {
|
|
1095
|
+
type: MediaFinishFrameType;
|
|
1096
|
+
/**
|
|
1097
|
+
* Who ended the run on the PBX.
|
|
1098
|
+
* @public
|
|
1099
|
+
*/
|
|
1100
|
+
reason: MediaFinishReason;
|
|
1101
|
+
}
|
|
1102
|
+
/**
|
|
1103
|
+
* An agent audio stream changed state on the PBX.
|
|
1104
|
+
* @public
|
|
1105
|
+
*/
|
|
1106
|
+
export interface MediaPlaybackFrame {
|
|
1107
|
+
type: MediaPlaybackFrameType;
|
|
1108
|
+
/**
|
|
1109
|
+
* Id of a reply, a stream, an utterance or a DTMF input, unique in the run.
|
|
1110
|
+
* @public
|
|
1111
|
+
*/
|
|
1112
|
+
replyId: string;
|
|
1113
|
+
/**
|
|
1114
|
+
* Id of a reply, a stream, an utterance or a DTMF input, unique in the run.
|
|
1115
|
+
* @public
|
|
1116
|
+
*/
|
|
1117
|
+
streamId: string;
|
|
1118
|
+
/**
|
|
1119
|
+
* Event of an agent audio stream.
|
|
1120
|
+
* @public
|
|
1121
|
+
*/
|
|
1122
|
+
event: MediaPlaybackEvent;
|
|
1123
|
+
/**
|
|
1124
|
+
* Run-clock time or duration in ms of PBX audio since the run started. It continues across reconnects.
|
|
1125
|
+
* @public
|
|
1126
|
+
*/
|
|
1127
|
+
atMs: number;
|
|
1128
|
+
/**
|
|
1129
|
+
* Audio of the stream that played, in ms. Present with `finished` and `stopped`.
|
|
1130
|
+
* @public
|
|
1131
|
+
*/
|
|
1132
|
+
playedMs?: number | undefined;
|
|
1133
|
+
/**
|
|
1134
|
+
* Present with `stopped`.
|
|
1135
|
+
* @public
|
|
1136
|
+
*/
|
|
1137
|
+
cause?: MediaPlaybackStopCause | undefined;
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* The agent of a media run. At most one of `draft` and `version` is set.
|
|
1141
|
+
* @public
|
|
1142
|
+
*/
|
|
1143
|
+
export interface MediaStartAgent {
|
|
1144
|
+
/**
|
|
1145
|
+
* Agent id.
|
|
1146
|
+
* @public
|
|
1147
|
+
*/
|
|
1148
|
+
id: string;
|
|
1149
|
+
/**
|
|
1150
|
+
* True to run the unpublished draft. Absent or null: false.
|
|
1151
|
+
* @public
|
|
1152
|
+
*/
|
|
1153
|
+
draft?: boolean | undefined;
|
|
1154
|
+
/**
|
|
1155
|
+
* Published version to run. Absent or null: the version the agent routing selects.
|
|
1156
|
+
* @public
|
|
1157
|
+
*/
|
|
1158
|
+
version?: number | undefined;
|
|
1159
|
+
}
|
|
1160
|
+
/**
|
|
1161
|
+
* Format of the binary PBX audio (`MediaPbxAudio`). Channel 0 is the caller; channel 1, when present, is the callee. Samples interleave.
|
|
1162
|
+
* @public
|
|
1163
|
+
*/
|
|
1164
|
+
export interface MediaAudioFormat {
|
|
1165
|
+
/**
|
|
1166
|
+
* Sample encoding of PBX audio.
|
|
1167
|
+
* @public
|
|
1168
|
+
*/
|
|
1169
|
+
encoding: MediaAudioEncoding;
|
|
1170
|
+
/**
|
|
1171
|
+
* Sample rate in Hz.
|
|
1172
|
+
* @public
|
|
1173
|
+
*/
|
|
1174
|
+
sampleRate: number;
|
|
1175
|
+
/**
|
|
1176
|
+
* Number of channels.
|
|
1177
|
+
* @public
|
|
1178
|
+
*/
|
|
1179
|
+
channels: number;
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* Caller identity. Each member is absent, null or empty when unknown.
|
|
1183
|
+
* @public
|
|
1184
|
+
*/
|
|
1185
|
+
export interface MediaStartCaller {
|
|
1186
|
+
name?: string | undefined;
|
|
1187
|
+
number?: string | undefined;
|
|
1188
|
+
email?: string | undefined;
|
|
1189
|
+
company?: string | undefined;
|
|
1190
|
+
}
|
|
1191
|
+
/**
|
|
1192
|
+
* First text frame of a socket, sent within 10 s of the upgrade. Opens a run, or attaches a reconnect to it.
|
|
1193
|
+
* @public
|
|
1194
|
+
*/
|
|
1195
|
+
export interface MediaStartFrame {
|
|
1196
|
+
type: MediaStartFrameType;
|
|
1197
|
+
/**
|
|
1198
|
+
* Purpose of a media run.
|
|
1199
|
+
* @public
|
|
1200
|
+
*/
|
|
1201
|
+
purpose: MediaRunPurpose;
|
|
1202
|
+
/**
|
|
1203
|
+
* Id of the PBX call. Use it to correlate the call events of the run.
|
|
1204
|
+
* @public
|
|
1205
|
+
*/
|
|
1206
|
+
callId: string;
|
|
1207
|
+
/**
|
|
1208
|
+
* Index of this run on the call, from 0.
|
|
1209
|
+
* @public
|
|
1210
|
+
*/
|
|
1211
|
+
flowIndex: number;
|
|
1212
|
+
/**
|
|
1213
|
+
* Id of this run. The same on every connection of the run; the cloud attaches a reconnect and settles a takeover by it.
|
|
1214
|
+
* @public
|
|
1215
|
+
*/
|
|
1216
|
+
sessionId: string;
|
|
1217
|
+
/**
|
|
1218
|
+
* True when an earlier connection of this run got `started`: the cloud continues that session without a new greeting.
|
|
1219
|
+
* @public
|
|
1220
|
+
*/
|
|
1221
|
+
resume: boolean;
|
|
1222
|
+
/**
|
|
1223
|
+
* Run-clock time of the first audio byte of this connection: 0 on the first connection.
|
|
1224
|
+
* @public
|
|
1225
|
+
*/
|
|
1226
|
+
resumeAtMs: number;
|
|
1227
|
+
/**
|
|
1228
|
+
* Format of the binary PBX audio (`MediaPbxAudio`). Channel 0 is the caller; channel 1, when present, is the callee. Samples interleave.
|
|
1229
|
+
* @public
|
|
1230
|
+
*/
|
|
1231
|
+
audio: MediaAudioFormat;
|
|
1232
|
+
/**
|
|
1233
|
+
* Present when `purpose` is `agent`.
|
|
1234
|
+
* @public
|
|
1235
|
+
*/
|
|
1236
|
+
agent?: MediaStartAgent | undefined;
|
|
1237
|
+
/**
|
|
1238
|
+
* Languages to recognise when `purpose` is `transcription`. May be empty only when `autoDetect` is true. Ignored when `purpose` is `agent`: the agent settings give the languages.
|
|
1239
|
+
* @public
|
|
1240
|
+
*/
|
|
1241
|
+
languages?: string[] | undefined;
|
|
1242
|
+
/**
|
|
1243
|
+
* Language of the call. Required when `purpose` is `agent`: the agent starts in its configured language that matches it. With `transcription`, absent or null means the first of `languages`.
|
|
1244
|
+
* @public
|
|
1245
|
+
*/
|
|
1246
|
+
preferredLanguage?: string | undefined;
|
|
1247
|
+
/**
|
|
1248
|
+
* True to identify the caller's language among `languages` when `purpose` is `transcription`. Absent: false. Ignored when `purpose` is `agent`.
|
|
1249
|
+
* @public
|
|
1250
|
+
*/
|
|
1251
|
+
autoDetect?: boolean | undefined;
|
|
1252
|
+
/**
|
|
1253
|
+
* Caller identity. Each member is absent, null or empty when unknown.
|
|
1254
|
+
* @public
|
|
1255
|
+
*/
|
|
1256
|
+
caller: MediaStartCaller;
|
|
1257
|
+
/**
|
|
1258
|
+
* Number that the caller dialled. Absent, null or empty when unknown.
|
|
1259
|
+
* @public
|
|
1260
|
+
*/
|
|
1261
|
+
dialedNumber?: string | undefined;
|
|
1262
|
+
/**
|
|
1263
|
+
* Base64 of a JSON object of the `VOICEBOT_*` channel variables. Absent, null or empty when there are none.
|
|
1264
|
+
* @public
|
|
1265
|
+
*/
|
|
1266
|
+
variables?: string | undefined;
|
|
1267
|
+
}
|
|
1268
|
+
/**
|
|
1269
|
+
* Voice activity of a party as the PBX detects it. Sent when the state changes, and every 100 ms while agent audio plays.
|
|
1270
|
+
* @public
|
|
1271
|
+
*/
|
|
1272
|
+
export interface MediaVadFrame {
|
|
1273
|
+
type: MediaVadFrameType;
|
|
1274
|
+
/**
|
|
1275
|
+
* Party whose audio the report describes.
|
|
1276
|
+
* @public
|
|
1277
|
+
*/
|
|
1278
|
+
party: MediaParty;
|
|
1279
|
+
/**
|
|
1280
|
+
* True while the party speaks.
|
|
1281
|
+
* @public
|
|
1282
|
+
*/
|
|
1283
|
+
speaking: boolean;
|
|
1284
|
+
/**
|
|
1285
|
+
* Energy of the audio frame that produced the report, in dBFS.
|
|
1286
|
+
* @public
|
|
1287
|
+
*/
|
|
1288
|
+
energyDb: number;
|
|
1289
|
+
/**
|
|
1290
|
+
* Run-clock time or duration in ms of PBX audio since the run started. It continues across reconnects.
|
|
1291
|
+
* @public
|
|
1292
|
+
*/
|
|
1293
|
+
atMs: number;
|
|
1294
|
+
}
|
|
1295
|
+
/**
|
|
1296
|
+
* One example of each message that the PBX sends.
|
|
1297
|
+
* @public
|
|
1298
|
+
*/
|
|
1299
|
+
export interface MediaPbxFrames {
|
|
1300
|
+
/**
|
|
1301
|
+
* First text frame of a socket, sent within 10 s of the upgrade. Opens a run, or attaches a reconnect to it.
|
|
1302
|
+
* @public
|
|
1303
|
+
*/
|
|
1304
|
+
start?: MediaStartFrame | undefined;
|
|
1305
|
+
/**
|
|
1306
|
+
* One binary audio message. In the describe answer it is base64; on the socket it is raw bytes.
|
|
1307
|
+
* @public
|
|
1308
|
+
*/
|
|
1309
|
+
audio?: Uint8Array | undefined;
|
|
1310
|
+
/**
|
|
1311
|
+
* Voice activity of a party as the PBX detects it. Sent when the state changes, and every 100 ms while agent audio plays.
|
|
1312
|
+
* @public
|
|
1313
|
+
*/
|
|
1314
|
+
vad?: MediaVadFrame | undefined;
|
|
1315
|
+
/**
|
|
1316
|
+
* DTMF input that the PBX collected. The cloud takes `digits` as the caller's reply.
|
|
1317
|
+
* @public
|
|
1318
|
+
*/
|
|
1319
|
+
dtmf?: MediaDtmfFrame | undefined;
|
|
1320
|
+
/**
|
|
1321
|
+
* An agent audio stream changed state on the PBX.
|
|
1322
|
+
* @public
|
|
1323
|
+
*/
|
|
1324
|
+
playback?: MediaPlaybackFrame | undefined;
|
|
1325
|
+
/**
|
|
1326
|
+
* The run ended on the PBX. The PBX sends no audio after it and waits up to 3 s for `finished`.
|
|
1327
|
+
* @public
|
|
1328
|
+
*/
|
|
1329
|
+
finish?: MediaFinishFrame | undefined;
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* One example of each message of the PBX media socket.
|
|
1333
|
+
* @public
|
|
1334
|
+
*/
|
|
1335
|
+
export interface MediaProtocolFrames {
|
|
1336
|
+
/**
|
|
1337
|
+
* Messages that the PBX sends.
|
|
1338
|
+
* @public
|
|
1339
|
+
*/
|
|
1340
|
+
pbx?: MediaPbxFrames | undefined;
|
|
1341
|
+
/**
|
|
1342
|
+
* Messages that the cloud sends.
|
|
1343
|
+
* @public
|
|
1344
|
+
*/
|
|
1345
|
+
cloud?: MediaCloudFrames | undefined;
|
|
1346
|
+
}
|
|
767
1347
|
/**
|
|
768
1348
|
* Client-reported progress of an in-flight reply playback.
|
|
769
1349
|
* @public
|
|
@@ -1273,18 +1853,111 @@ export interface DescribeVoiceProtocolOutput {
|
|
|
1273
1853
|
* @public
|
|
1274
1854
|
*/
|
|
1275
1855
|
callEvent?: VoiceCallEvent | undefined;
|
|
1856
|
+
/**
|
|
1857
|
+
* Messages of the PBX media socket `/v2/voice/media/ws` (subprotocol `wilma-media-v2`): one example of each. The binary audio messages are base64 here and raw bytes on the socket.
|
|
1858
|
+
* @public
|
|
1859
|
+
*/
|
|
1860
|
+
media?: MediaProtocolFrames | undefined;
|
|
1861
|
+
}
|
|
1862
|
+
/**
|
|
1863
|
+
* @public
|
|
1864
|
+
*/
|
|
1865
|
+
export interface GetVoiceDefaultsInput {
|
|
1866
|
+
}
|
|
1867
|
+
/**
|
|
1868
|
+
* Defaults of the tuning members of `VoiceChannelSettings.interruptions`.
|
|
1869
|
+
* @public
|
|
1870
|
+
*/
|
|
1871
|
+
export interface VoiceInterruptionDefaults {
|
|
1872
|
+
/**
|
|
1873
|
+
* Minimum number of caller words that count as an interruption.
|
|
1874
|
+
* @public
|
|
1875
|
+
*/
|
|
1876
|
+
minWords: number;
|
|
1877
|
+
/**
|
|
1878
|
+
* Minimum recognition confidence, from 0 to 1, of the caller words that count as an interruption.
|
|
1879
|
+
* @public
|
|
1880
|
+
*/
|
|
1881
|
+
minConfidence: number;
|
|
1882
|
+
/**
|
|
1883
|
+
* Caller speech in ms before the agent's reply is lowered.
|
|
1884
|
+
* @public
|
|
1885
|
+
*/
|
|
1886
|
+
duckAfterMs: number;
|
|
1887
|
+
/**
|
|
1888
|
+
* Volume in dB of a lowered reply.
|
|
1889
|
+
* @public
|
|
1890
|
+
*/
|
|
1891
|
+
duckVolumeDb: number;
|
|
1892
|
+
/**
|
|
1893
|
+
* Caller silence in ms before a lowered reply gets its volume back.
|
|
1894
|
+
* @public
|
|
1895
|
+
*/
|
|
1896
|
+
restoreAfterMs: number;
|
|
1897
|
+
}
|
|
1898
|
+
/**
|
|
1899
|
+
* Defaults of `VoiceChannelSettings.turnEnd`.
|
|
1900
|
+
* @public
|
|
1901
|
+
*/
|
|
1902
|
+
export interface VoiceTurnEndDefaults {
|
|
1903
|
+
/**
|
|
1904
|
+
* Wait in ms after the recogniser marks the end of a caller phrase, before the agent answers.
|
|
1905
|
+
* @public
|
|
1906
|
+
*/
|
|
1907
|
+
holdMs: number;
|
|
1908
|
+
}
|
|
1909
|
+
/**
|
|
1910
|
+
* Defaults of `VoiceChannelSettings.voiceDetection`.
|
|
1911
|
+
* @public
|
|
1912
|
+
*/
|
|
1913
|
+
export interface VoiceDetectionDefaults {
|
|
1914
|
+
/**
|
|
1915
|
+
* Silence in ms that ends the caller speech.
|
|
1916
|
+
* @public
|
|
1917
|
+
*/
|
|
1918
|
+
silenceMs: number;
|
|
1919
|
+
/**
|
|
1920
|
+
* Level in dBFS below which caller audio is silence.
|
|
1921
|
+
* @public
|
|
1922
|
+
*/
|
|
1923
|
+
silenceLevelDb: number;
|
|
1924
|
+
/**
|
|
1925
|
+
* Mean frame level in dBFS from which caller audio is speech.
|
|
1926
|
+
* @public
|
|
1927
|
+
*/
|
|
1928
|
+
speechLevelDb: number;
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* @public
|
|
1932
|
+
*/
|
|
1933
|
+
export interface GetVoiceDefaultsOutput {
|
|
1934
|
+
/**
|
|
1935
|
+
* Defaults of `VoiceChannelSettings.voiceDetection`.
|
|
1936
|
+
* @public
|
|
1937
|
+
*/
|
|
1938
|
+
voiceDetection: VoiceDetectionDefaults;
|
|
1939
|
+
/**
|
|
1940
|
+
* Defaults of the tuning members of `VoiceChannelSettings.interruptions`.
|
|
1941
|
+
* @public
|
|
1942
|
+
*/
|
|
1943
|
+
interruptions: VoiceInterruptionDefaults;
|
|
1944
|
+
/**
|
|
1945
|
+
* Defaults of `VoiceChannelSettings.turnEnd`.
|
|
1946
|
+
* @public
|
|
1947
|
+
*/
|
|
1948
|
+
turnEnd: VoiceTurnEndDefaults;
|
|
1276
1949
|
}
|
|
1277
1950
|
/**
|
|
1278
1951
|
* @public
|
|
1279
1952
|
*/
|
|
1280
1953
|
export interface ListVoicesInput {
|
|
1281
1954
|
/**
|
|
1282
|
-
* Provider whose catalog to read: 'elevenlabs', 'google', 'amazon_polly'. This is the scheme of the URIs answered on `voices`.
|
|
1955
|
+
* Provider whose catalog to read: 'elevenlabs', 'google', 'amazon_polly', 'soniox'. This is the scheme of the URIs answered on `voices`.
|
|
1283
1956
|
* @public
|
|
1284
1957
|
*/
|
|
1285
1958
|
provider: string;
|
|
1286
1959
|
/**
|
|
1287
|
-
* Server-side filter for language-bound providers: only voices whose language SET CONTAINS this code. Ignored for ElevenLabs, whose voices are not language bound.
|
|
1960
|
+
* Server-side filter for language-bound providers: only voices whose language SET CONTAINS this code. Ignored for ElevenLabs, whose voices are not language bound. For Soniox it keeps the voices whose model speaks the language.
|
|
1288
1961
|
* @public
|
|
1289
1962
|
*/
|
|
1290
1963
|
language?: string | undefined;
|