@cognigy/rest-api-client 0.15.0 → 0.17.0
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/CHANGELOG.md +17 -0
- package/build/GenericTusFn.js +64 -0
- package/build/RestAPIClient.js +3 -0
- package/build/apigroups/AdministrationAPIGroup_2_0.js +7 -2
- package/build/apigroups/ResourcesAPIGroup_2_0.js +28 -23
- package/build/{shared/interfaces/agentAssist/ISendTileUpdateReferenceParams.js → apigroups/TTusAPIOperation.js} +1 -1
- package/build/apigroups/index.js +2 -0
- package/build/connector/AxiosAdapter.js +5 -4
- package/build/shared/charts/descriptors/agentAssist/constants/constants.js +7 -0
- package/build/shared/charts/descriptors/agentAssist/helpers/sentiment.helper.js +41 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/identityAssistTemplate.js +54 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/knowledgeAssistTemplate.js +203 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/nextActionWidgetTemplate.js +93 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage0.js +81 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage1.js +84 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stage2.js +97 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/secureForms/stageError.js +85 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/sentimentAnalysisTemplate.js +41 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/stylesPartial.js +15 -0
- package/build/shared/charts/descriptors/agentAssist/htmlTemplates/transcriptAssistTemplate.js +53 -0
- package/build/shared/charts/descriptors/agentAssist/identityAssist.js +135 -0
- package/build/shared/charts/descriptors/agentAssist/index.js +15 -1
- package/build/shared/charts/descriptors/agentAssist/knowledgeAssist.js +625 -0
- package/build/shared/charts/descriptors/agentAssist/nextActionAssist.js +77 -0
- package/build/shared/charts/descriptors/agentAssist/sentimentAssist.js +86 -0
- package/build/shared/charts/descriptors/agentAssist/setAdaptiveCardTile.js +2 -2
- package/build/shared/charts/descriptors/agentAssist/setAgentAssistGrid.js +120 -0
- package/build/shared/charts/descriptors/agentAssist/setHtmlTile.js +2 -2
- package/build/shared/charts/descriptors/agentAssist/setIframeTile.js +2 -2
- package/build/shared/charts/descriptors/agentAssist/setSecureFormsTile.js +171 -0
- package/build/shared/charts/descriptors/agentAssist/transcriptAssist.js +72 -0
- package/build/shared/charts/descriptors/allFields.js +12 -0
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/TGenerativeAIConnectionFields.js +3 -0
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/alephAlphaProviderConnection.js +11 -0
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/anthropicProviderConnection.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/azureOpenAIProviderConnectionV2.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/index.js +6 -2
- package/build/shared/charts/descriptors/connectionNodes/generativeAIProviders/openAIProviderConnection.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/amazonStorageProviderConnection.js +4 -4
- package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/azureBlobStorageProviderConnection.js +3 -3
- package/build/shared/charts/descriptors/connectionNodes/internalStorageProviders/googleCloudStorageProviderConnection.js +3 -3
- package/build/shared/charts/descriptors/connectionNodes/mongoDB/mongoDBConnection.js +1 -1
- package/build/shared/charts/descriptors/connectionNodes/smtp/oAuth2Connection.js +8 -8
- package/build/shared/charts/descriptors/connectionNodes/smtp/serviceConnection.js +2 -2
- package/build/shared/charts/descriptors/connectionNodes/smtp/smtpConnection.js +5 -5
- package/build/shared/charts/descriptors/connectionNodes/speechProviders/awsSpeechProviderConnection.js +4 -4
- package/build/shared/charts/descriptors/connectionNodes/speechProviders/microsoftSpeechProviderConnection.js +2 -2
- package/build/shared/charts/descriptors/connectionNodes/sql/sqlConnection.js +5 -5
- package/build/shared/charts/descriptors/connectionNodes/translationProviders/deeplTranslationProviderConnection.js +15 -0
- package/build/shared/charts/descriptors/connectionNodes/translationProviders/googleTranslationProviderConnection.js +15 -0
- package/build/shared/charts/descriptors/connectionNodes/translationProviders/index.js +23 -0
- package/build/shared/charts/descriptors/connectionNodes/translationProviders/microsoftTranslationProviderConnection.js +21 -0
- package/build/shared/charts/descriptors/index.js +13 -2
- package/build/shared/charts/descriptors/knowledgeSearch/constants/constants.js +6 -0
- package/build/shared/charts/descriptors/knowledgeSearch/index.js +5 -1
- package/build/shared/charts/descriptors/knowledgeSearch/knowledgeSearch.js +7 -2
- package/build/shared/charts/descriptors/knowledgeSearch/knowledgeSearchV2.js +151 -0
- package/build/shared/charts/descriptors/knowledgeSearch/searchExtractOutput.js +985 -0
- package/build/shared/charts/descriptors/logic/goTo.js +2 -0
- package/build/shared/charts/descriptors/message/question/optionalQuestion.js +2 -2
- package/build/shared/charts/descriptors/message/question/question.js +215 -8
- package/build/shared/charts/descriptors/nlu/cleanText.js +1 -0
- package/build/shared/charts/descriptors/nlu/generativeSlotFiller/prompt.js +107 -5
- package/build/shared/charts/descriptors/service/GPTConversation.js +125 -23
- package/build/shared/charts/descriptors/service/GPTPrompt.js +148 -12
- package/build/shared/charts/descriptors/service/checkAgentAvailability.js +15 -1
- package/build/shared/charts/descriptors/service/handoverV2.js +45 -0
- package/build/shared/{interfaces/twilioInterface.js → charts/descriptors/voice/interface/IBandwidth.js} +1 -1
- package/build/shared/charts/descriptors/voice/mappers/base.mapper.js +14 -0
- package/build/shared/charts/descriptors/voice/mappers/hangup.mapper.js +26 -0
- package/build/shared/charts/descriptors/voice/mappers/muteSpeechInput.mapper.js +17 -2
- package/build/shared/charts/descriptors/voice/mappers/play.mapper.js +54 -0
- package/build/shared/charts/descriptors/voice/mappers/record.mapper.js +7 -0
- package/build/shared/charts/descriptors/voice/mappers/sendMetadata.mapper.js +15 -0
- package/build/shared/charts/descriptors/voice/mappers/setSessionConfig.mapper.js +56 -20
- package/build/shared/charts/descriptors/voice/mappers/transfer.mapper.js +39 -13
- package/build/shared/charts/descriptors/voice/nodes/muteSpeechInput.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/play.js +1 -1
- package/build/shared/charts/descriptors/voice/nodes/sessionSpeechParameters.js +120 -29
- package/build/shared/charts/descriptors/voice/nodes/transfer.js +11 -3
- package/build/shared/charts/descriptors/voice/utils/vgConstants.js +14 -0
- package/build/shared/charts/descriptors/voicegateway/index.js +14 -11
- package/build/shared/charts/descriptors/voicegateway/utils/paramUtils.js +1 -5
- package/build/shared/charts/descriptors/voicegateway2/nodes/muteSpeechInput.js +12 -1
- package/build/shared/charts/descriptors/voicegateway2/nodes/play.js +6 -0
- package/build/shared/charts/descriptors/voicegateway2/nodes/setSessionConfig.js +159 -36
- package/build/shared/charts/descriptors/voicegateway2/nodes/transfer.js +296 -43
- package/build/shared/charts/descriptors/voicegateway2/utils/helper.js +30 -4
- package/build/shared/charts/helpers/generativeAI/rephraseSentenceWithAi.js +1 -1
- package/build/shared/constants.js +5 -1
- package/build/shared/handoverClients/interfaces/THandoverEventType.js +3 -1
- package/build/shared/helper/BaseContext.js +33 -15
- package/build/shared/helper/nlu/textCleaner.js +25 -3
- package/build/shared/interfaces/IEndpointTranslationSettings.js +9 -0
- package/build/shared/interfaces/IOrganisation.js +2 -1
- package/build/shared/interfaces/agentAssist/ISendConfigUpdateParams.js +3 -0
- package/build/shared/interfaces/agentAssist/ISendUpdateReferenceParams.js +3 -0
- package/build/shared/interfaces/amqpInterface.js +18 -22
- package/build/shared/interfaces/channels/genesysBotConnector.js +21 -0
- package/build/shared/interfaces/channels/niceCXOne.js +8 -0
- package/build/shared/interfaces/generativeAI/IGenerativeAIModels.js +17 -7
- package/build/shared/interfaces/handover.js +57 -3
- package/build/shared/interfaces/journeys/IJourney.js +6 -0
- package/build/shared/interfaces/journeys/IJourneyTrackEvent.js +2 -0
- package/build/shared/interfaces/messageAPI/endpoints.js +93 -8
- package/build/shared/interfaces/messageAPI/handover.js +4 -4
- package/build/shared/interfaces/resources/IAuditEvent.js +1 -0
- package/build/shared/interfaces/resources/IConnectionSchema.js +3 -0
- package/build/shared/interfaces/resources/IEndpoint.js +1 -0
- package/build/shared/interfaces/resources/IExtension.js +3 -0
- package/build/shared/interfaces/resources/ILargeLanguageModel.js +24 -5
- package/build/shared/interfaces/resources/INodeDescriptorSet.js +24 -1
- package/build/shared/interfaces/resources/TNLUConnectorType.js +0 -1
- package/build/shared/interfaces/resources/TRestChannelType.js +16 -11
- package/build/shared/interfaces/resources/TSocketChannelType.js +5 -1
- package/build/shared/interfaces/resources/TWebhookChannelType.js +6 -1
- package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeChunk.js +21 -3
- package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeSource.js +13 -2
- package/build/shared/interfaces/resources/knowledgeStore/IKnowledgeStore.js +1 -1
- package/build/shared/interfaces/resources/settings/IAgentSettings.js +3 -23
- package/build/shared/interfaces/resources/settings/IGenerativeAISettings.js +4 -0
- package/build/shared/interfaces/resources/settings/ITranslationSettings.js +63 -0
- package/build/shared/interfaces/resources/settings/index.js +4 -1
- package/build/shared/interfaces/restAPI/administration/voiceGateway/v2.0/IReadVoiceGatewayAccountRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/administration/voiceGateway/v2.0/ISetupVoiceGatewayAccountRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/administration/voiceGateway/v2.0/index.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/ICallCounterAggregatedValue_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/IGetCallCounterOrganisationRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/IGetCallCounterRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/callCounter/v2.0/index.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/knowledgeQueryCounter/v2.0/IGetKnowledgeQueryCounterOrganisationRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/knowledgeQueryCounter/v2.0/IGetKnowledgeQueryCounterRest_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/knowledgeQueryCounter/v2.0/IKnowlegeQueryCounterAggregatedValue_2_0.js +3 -0
- package/build/shared/interfaces/restAPI/metrics/knowledgeQueryCounter/v2.0/index.js +3 -0
- package/build/shared/interfaces/restAPI/resources/nluconnector/v2.0/TNLUConnectorType_2_0.js +0 -2
- package/build/shared/interfaces/restAPI/resources/uploadResumable/v2.0/IUploadResumableRest_2_0.js +17 -0
- package/build/shared/interfaces/restAPI/resources/uploadResumable/v2.0/index.js +3 -0
- package/build/shared/interfaces/security/ICallCounterAggregatedValue.js +3 -0
- package/build/shared/interfaces/security/IKnowledgeQueryCounterAggregatedValue.js +3 -0
- package/build/shared/interfaces/security/IPermission.js +3 -0
- package/build/shared/interfaces/security/IRole.js +9 -1
- package/build/shared/interfaces/security/index.js +2 -1
- package/build/shared/interfaces/trainer/ITrainerRecord.js +2 -0
- package/build/test.js +27 -0
- package/package.json +19 -17
- package/types/index.d.ts +823 -140
|
@@ -10,6 +10,8 @@ exports.play = {
|
|
|
10
10
|
handleInput(params) {
|
|
11
11
|
const { endpointType, config } = params;
|
|
12
12
|
switch (endpointType) {
|
|
13
|
+
case "bandwidth":
|
|
14
|
+
return this.handleBandwidthInput(config);
|
|
13
15
|
case "audioCodes":
|
|
14
16
|
return this.handleAudioCodesInput(config);
|
|
15
17
|
case "voiceGateway2":
|
|
@@ -94,6 +96,58 @@ exports.play = {
|
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
98
|
};
|
|
99
|
+
},
|
|
100
|
+
handleBandwidthInput(config) {
|
|
101
|
+
let { playUrlUrl, playUrlMediaFormat, playUrlAltText, setActivityParams, activityParams, playUrlCaching } = config;
|
|
102
|
+
// set up default if the config is not present (from generic play node)
|
|
103
|
+
if (playUrlCaching === undefined)
|
|
104
|
+
playUrlCaching = true;
|
|
105
|
+
if (playUrlMediaFormat === undefined)
|
|
106
|
+
playUrlMediaFormat = "wav/lpcm16";
|
|
107
|
+
let compiledParams = Object.assign(activityParams || {}, {
|
|
108
|
+
playUrlUrl,
|
|
109
|
+
playUrlMediaFormat
|
|
110
|
+
});
|
|
111
|
+
if (playUrlAltText)
|
|
112
|
+
compiledParams["playUrlAltText"] = playUrlAltText;
|
|
113
|
+
if (playUrlCaching !== null)
|
|
114
|
+
compiledParams["playUrlCaching"] = !!playUrlCaching;
|
|
115
|
+
if (setActivityParams) {
|
|
116
|
+
(0, paramUtils_1.compileParams)(config, compiledParams);
|
|
117
|
+
}
|
|
118
|
+
// translate config of generic node into Bandwidth
|
|
119
|
+
if (compiledParams.bargeInOnSpeech !== undefined)
|
|
120
|
+
compiledParams.bargeIn = compiledParams.bargeInOnSpeech;
|
|
121
|
+
if (compiledParams.bargeInOnDtmf !== undefined)
|
|
122
|
+
compiledParams.bargeInOnDTMF = compiledParams.bargeInOnDtmf;
|
|
123
|
+
if (compiledParams.dtmfEnable !== undefined)
|
|
124
|
+
compiledParams.sendDTMF = compiledParams.dtmfEnable;
|
|
125
|
+
if (compiledParams.dtmfInterDigitTimeout !== undefined)
|
|
126
|
+
compiledParams.dtmfCollectInterDigitTimeoutMS = compiledParams.dtmfInterDigitTimeout;
|
|
127
|
+
if (compiledParams.dtmfMaxDigits !== undefined)
|
|
128
|
+
compiledParams.dtmfCollectMaxDigits = compiledParams.dtmfMaxDigits;
|
|
129
|
+
if (compiledParams.dtmfSubmitDigit !== undefined)
|
|
130
|
+
compiledParams.dtmfCollectSubmitDigit = compiledParams.dtmfSubmitDigit;
|
|
131
|
+
// remove the configurations from VG2
|
|
132
|
+
delete compiledParams.url;
|
|
133
|
+
delete compiledParams.bargeInOnSpeech;
|
|
134
|
+
delete compiledParams.bargeInOnDtmf;
|
|
135
|
+
delete compiledParams.dtmfEnable;
|
|
136
|
+
delete compiledParams.dtmfInterDigitTimeout;
|
|
137
|
+
delete compiledParams.dtmfMaxDigits;
|
|
138
|
+
delete compiledParams.dtmfMinDigits;
|
|
139
|
+
delete compiledParams.dtmfSubmitDigit;
|
|
140
|
+
return {
|
|
141
|
+
_bandwidth: {
|
|
142
|
+
json: {
|
|
143
|
+
activities: [{
|
|
144
|
+
type: "event",
|
|
145
|
+
name: "playUrl",
|
|
146
|
+
activityParams: compiledParams
|
|
147
|
+
}]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
97
151
|
}
|
|
98
152
|
};
|
|
99
153
|
//# sourceMappingURL=play.mapper.js.map
|
|
@@ -8,6 +8,10 @@ class RecordMapper extends base_mapper_1.BaseMapper {
|
|
|
8
8
|
handleInput(input, api, isGenericNode = false) {
|
|
9
9
|
try {
|
|
10
10
|
switch (this.endpointType) {
|
|
11
|
+
case "bandwidth": {
|
|
12
|
+
const output = this.handleBandwidthInput(input, api);
|
|
13
|
+
return this.buildPayload(output);
|
|
14
|
+
}
|
|
11
15
|
case "audioCodes": {
|
|
12
16
|
const output = this.handleAudioCodesInput(input, api);
|
|
13
17
|
return this.buildPayload(output);
|
|
@@ -91,6 +95,9 @@ class RecordMapper extends base_mapper_1.BaseMapper {
|
|
|
91
95
|
handleAudioCodesInput(input, api) {
|
|
92
96
|
return {};
|
|
93
97
|
}
|
|
98
|
+
handleBandwidthInput(input, api) {
|
|
99
|
+
return {};
|
|
100
|
+
}
|
|
94
101
|
}
|
|
95
102
|
exports.RecordMapper = RecordMapper;
|
|
96
103
|
//# sourceMappingURL=record.mapper.js.map
|
|
@@ -11,6 +11,8 @@ exports.sendMetadata = {
|
|
|
11
11
|
throw new Error("Nothing is set in Metadata Field");
|
|
12
12
|
}
|
|
13
13
|
switch (endpointType) {
|
|
14
|
+
case "bandwidth":
|
|
15
|
+
return this.handleBandwidthInput(metadata);
|
|
14
16
|
case "audioCodes":
|
|
15
17
|
return this.handleAudioCodesInput(metadata);
|
|
16
18
|
case "voiceGateway2":
|
|
@@ -48,6 +50,19 @@ exports.sendMetadata = {
|
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
};
|
|
53
|
+
},
|
|
54
|
+
handleBandwidthInput(metadata) {
|
|
55
|
+
return {
|
|
56
|
+
_bandwidth: {
|
|
57
|
+
json: {
|
|
58
|
+
activities: [{
|
|
59
|
+
type: "event",
|
|
60
|
+
name: "sendMetaData",
|
|
61
|
+
value: metadata
|
|
62
|
+
}]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
51
66
|
}
|
|
52
67
|
};
|
|
53
68
|
//# sourceMappingURL=sendMetadata.mapper.js.map
|
|
@@ -4,8 +4,16 @@ exports.setSessionConfig = exports.vg2PayloadToActivityParams = exports.voiceCon
|
|
|
4
4
|
const strip_nulls_1 = require("../../voicegateway2/utils/strip-nulls");
|
|
5
5
|
const helper_1 = require("../utils/helper");
|
|
6
6
|
function voiceConfigParamsToVoiceSettings(config, api) {
|
|
7
|
-
var _a, _b, _c, _d;
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
8
8
|
let voiceSettings = {};
|
|
9
|
+
if (config.sttVendor === 'none') {
|
|
10
|
+
delete config.sttVendor;
|
|
11
|
+
delete config.sttLabel;
|
|
12
|
+
}
|
|
13
|
+
if (config.ttsVendor === 'none') {
|
|
14
|
+
delete config.ttsVendor;
|
|
15
|
+
delete config.ttsLabel;
|
|
16
|
+
}
|
|
9
17
|
if (typeof config.bargeInOnDtmf === 'boolean' || typeof config.bargeInOnSpeech === 'boolean') {
|
|
10
18
|
voiceSettings.bargeIn = {
|
|
11
19
|
bargeInEnable: false,
|
|
@@ -37,24 +45,26 @@ function voiceConfigParamsToVoiceSettings(config, api) {
|
|
|
37
45
|
sttVendor: config.sttVendor,
|
|
38
46
|
sttLanguage: config.sttLanguage,
|
|
39
47
|
sttHints: hints,
|
|
48
|
+
sttLabel: config.sttLabel,
|
|
40
49
|
sttDisablePunctuation: config.sttDisablePunctuation !== undefined &&
|
|
41
50
|
config.sttDisablePunctuation !== null
|
|
42
51
|
? !config.sttDisablePunctuation
|
|
43
|
-
: undefined
|
|
52
|
+
: undefined,
|
|
53
|
+
googleModel: (_d = config.googleModel) !== null && _d !== void 0 ? _d : undefined,
|
|
54
|
+
deepgramEnpointing: (_e = config.deepgramEndpointing) !== null && _e !== void 0 ? _e : undefined,
|
|
55
|
+
deepgramEndpointingValue: (_f = config.deepgramEndpointingValue) !== null && _f !== void 0 ? _f : undefined,
|
|
56
|
+
sttDeepgramModel: (_g = config.sttDeepgramModel) !== null && _g !== void 0 ? _g : undefined,
|
|
57
|
+
sttDeepgramTier: (_h = config.sttDeepgramTier) !== null && _h !== void 0 ? _h : undefined,
|
|
58
|
+
deepgramSmartFormatting: (_j = config.deepgramSmartFormatting) !== null && _j !== void 0 ? _j : undefined
|
|
44
59
|
};
|
|
45
60
|
// tts (synthesizer)
|
|
46
61
|
voiceSettings.tts = {
|
|
47
62
|
ttsVendor: config.ttsVendor,
|
|
48
63
|
ttsLanguage: config.ttsLanguage,
|
|
49
64
|
ttsVoice: config.ttsVoice,
|
|
50
|
-
azureServiceEndpoint: config.azureTtsDeploymentId,
|
|
51
65
|
ttsDisableCache: config.ttsDisableCache,
|
|
66
|
+
ttsLabel: config.ttsLabel,
|
|
52
67
|
};
|
|
53
|
-
if (config.ttsVendor === "microsoft") {
|
|
54
|
-
if (config.azureTtsDeploymentId) {
|
|
55
|
-
voiceSettings.tts.azureServiceEndpoint = config.azureTtsDeploymentId;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
68
|
if (config.sttVendor === "microsoft") {
|
|
59
69
|
if (config.recognizeLanguagesAzure) {
|
|
60
70
|
voiceSettings.stt.altLanguages = [];
|
|
@@ -79,6 +89,9 @@ function voiceConfigParamsToVoiceSettings(config, api) {
|
|
|
79
89
|
});
|
|
80
90
|
}
|
|
81
91
|
}
|
|
92
|
+
if (config.ttsVendor === "elevenlabs") {
|
|
93
|
+
voiceSettings.tts.ttsModel = config.ttsModel;
|
|
94
|
+
}
|
|
82
95
|
// userNoInput
|
|
83
96
|
voiceSettings.userNoInput = {
|
|
84
97
|
userNoInputMode: config.userNoInputMode,
|
|
@@ -92,7 +105,7 @@ function voiceConfigParamsToVoiceSettings(config, api) {
|
|
|
92
105
|
dtmfInterDigitTimeout: config.dtmfInterDigitTimeout,
|
|
93
106
|
dtmfMaxDigits: config.dtmfMaxDigits,
|
|
94
107
|
dtmfMinDigits: config.dtmfMinDigits,
|
|
95
|
-
dtmfSubmitDigit: (
|
|
108
|
+
dtmfSubmitDigit: (_k = config.dtmfSubmitDigit) === null || _k === void 0 ? void 0 : _k.trim(),
|
|
96
109
|
};
|
|
97
110
|
if (config === null || config === void 0 ? void 0 : config.dtmfEnable) {
|
|
98
111
|
if (voiceSettings.dtmf.dtmfSubmitDigit &&
|
|
@@ -128,16 +141,12 @@ function voiceConfigParamsToVoiceSettings(config, api) {
|
|
|
128
141
|
}
|
|
129
142
|
}
|
|
130
143
|
// Azure configurations
|
|
131
|
-
if ((config.sttVendor === "microsoft" && config.azureSttContextId)
|
|
132
|
-
(config.sttVendor === "microsoft" && config.azureTtsDeploymentId)) {
|
|
144
|
+
if ((config.sttVendor === "microsoft" && config.azureSttContextId)) {
|
|
133
145
|
voiceSettings.azureConfig = {
|
|
134
146
|
azureSttContextId: config.azureSttContextId
|
|
135
147
|
? config.azureSttContextId.trim()
|
|
136
148
|
: undefined,
|
|
137
|
-
azureEnableAudioLogging: config.azureEnableAudioLogging || undefined
|
|
138
|
-
azureTtsDeploymentId: config.azureTtsDeploymentId
|
|
139
|
-
? config.azureTtsDeploymentId.trim()
|
|
140
|
-
: undefined,
|
|
149
|
+
azureEnableAudioLogging: config.azureEnableAudioLogging || undefined
|
|
141
150
|
};
|
|
142
151
|
}
|
|
143
152
|
return (0, strip_nulls_1.stripNulls)(voiceSettings);
|
|
@@ -158,14 +167,17 @@ exports.vg2PayloadToActivityParams = vg2PayloadToActivityParams;
|
|
|
158
167
|
exports.setSessionConfig = {
|
|
159
168
|
handleInput(endpointType, voiceSettings) {
|
|
160
169
|
switch (endpointType) {
|
|
170
|
+
case "bandwidth":
|
|
171
|
+
return this.handleAudioCodesInput(voiceSettings, endpointType);
|
|
161
172
|
case "audioCodes":
|
|
162
|
-
return this.handleAudioCodesInput(voiceSettings);
|
|
173
|
+
return this.handleAudioCodesInput(voiceSettings, endpointType);
|
|
163
174
|
case "voiceGateway2":
|
|
164
175
|
default:
|
|
165
176
|
return this.handleVGInput(voiceSettings);
|
|
166
177
|
}
|
|
167
178
|
},
|
|
168
179
|
handleVGInput(voiceSettings, sessionParams, api) {
|
|
180
|
+
var _a, _b, _c;
|
|
169
181
|
const { bargeIn, continuousAsr, stt, tts, userNoInput, dtmf, vad, azureConfig, } = voiceSettings;
|
|
170
182
|
const user = {};
|
|
171
183
|
const synthesizer = {};
|
|
@@ -173,6 +185,7 @@ exports.setSessionConfig = {
|
|
|
173
185
|
//verify if there are STT Configs to set
|
|
174
186
|
recognizer.language = (stt === null || stt === void 0 ? void 0 : stt.sttLanguage) || undefined;
|
|
175
187
|
recognizer.hints = (stt === null || stt === void 0 ? void 0 : stt.sttHints) ? stt.sttHints : undefined;
|
|
188
|
+
recognizer.label = (stt === null || stt === void 0 ? void 0 : stt.sttLabel) || undefined;
|
|
176
189
|
if (recognizer.hints && recognizer.hints !== undefined) {
|
|
177
190
|
recognizer.hintsBoost = (stt === null || stt === void 0 ? void 0 : stt.sttHintsBoost) || 20;
|
|
178
191
|
}
|
|
@@ -180,8 +193,21 @@ exports.setSessionConfig = {
|
|
|
180
193
|
recognizer.punctuation = stt === null || stt === void 0 ? void 0 : stt.sttDisablePunctuation;
|
|
181
194
|
recognizer.azureSttEndpointId = azureConfig === null || azureConfig === void 0 ? void 0 : azureConfig.azureSttContextId;
|
|
182
195
|
recognizer.audioLogging = azureConfig === null || azureConfig === void 0 ? void 0 : azureConfig.azureEnableAudioLogging;
|
|
183
|
-
if (recognizer
|
|
184
|
-
recognizer.
|
|
196
|
+
if (recognizer && recognizer.vendor && stt) {
|
|
197
|
+
if (recognizer.vendor === "microsoft" || recognizer.vendor === "google") {
|
|
198
|
+
recognizer.altLanguages = stt.altLanguages || [];
|
|
199
|
+
if (recognizer.vendor === "google" && (stt === null || stt === void 0 ? void 0 : stt.googleModel)) {
|
|
200
|
+
recognizer.model = stt.googleModel;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (recognizer && recognizer.vendor === 'deepgram') {
|
|
204
|
+
recognizer.deepgramOptions = {};
|
|
205
|
+
recognizer.deepgramOptions.endpointing = stt.deepgramEnpointing ? stt.deepgramEndpointingValue : false;
|
|
206
|
+
recognizer.deepgramOptions.punctuate = stt.sttDisablePunctuation;
|
|
207
|
+
recognizer.deepgramOptions.tier = (_a = stt.sttDeepgramTier) !== null && _a !== void 0 ? _a : undefined;
|
|
208
|
+
recognizer.deepgramOptions.model = (_b = stt.sttDeepgramModel) !== null && _b !== void 0 ? _b : undefined;
|
|
209
|
+
recognizer.deepgramOptions.smartFormatting = (_c = stt.deepgramSmartFormatting) !== null && _c !== void 0 ? _c : false;
|
|
210
|
+
}
|
|
185
211
|
}
|
|
186
212
|
if (vad) {
|
|
187
213
|
recognizer.vad = { enable: vad.enable };
|
|
@@ -196,6 +222,12 @@ exports.setSessionConfig = {
|
|
|
196
222
|
synthesizer.language = tts.ttsLanguage;
|
|
197
223
|
synthesizer.voice = tts.ttsVoice;
|
|
198
224
|
synthesizer.azureServiceEndpoint = tts.azureServiceEndpoint ? tts.azureServiceEndpoint : "";
|
|
225
|
+
synthesizer.label = tts.ttsLabel;
|
|
226
|
+
if (tts.ttsModel) {
|
|
227
|
+
synthesizer.options = {
|
|
228
|
+
model_id: tts.ttsModel
|
|
229
|
+
};
|
|
230
|
+
}
|
|
199
231
|
}
|
|
200
232
|
//verify if there are No User Input Configs to set
|
|
201
233
|
if (userNoInput) {
|
|
@@ -309,7 +341,7 @@ exports.setSessionConfig = {
|
|
|
309
341
|
};
|
|
310
342
|
return payload;
|
|
311
343
|
},
|
|
312
|
-
handleAudioCodesInput(voiceSettings) {
|
|
344
|
+
handleAudioCodesInput(voiceSettings, endpointType = "audioCodes") {
|
|
313
345
|
const { bargeIn, continuousAsr, stt, tts, userNoInput, dtmf, azureConfig } = voiceSettings;
|
|
314
346
|
const sessionParams = {};
|
|
315
347
|
if (stt) {
|
|
@@ -322,6 +354,9 @@ exports.setSessionConfig = {
|
|
|
322
354
|
sessionParams.sttSpeechContexts = hints;
|
|
323
355
|
}
|
|
324
356
|
sessionParams.sttDisablePunctuation = !stt.sttDisablePunctuation;
|
|
357
|
+
if (stt.googleModel) {
|
|
358
|
+
sessionParams.sttModel = stt.googleModel;
|
|
359
|
+
}
|
|
325
360
|
}
|
|
326
361
|
if (tts) {
|
|
327
362
|
sessionParams.ttsLanguage = tts.ttsLanguage;
|
|
@@ -381,8 +416,9 @@ exports.setSessionConfig = {
|
|
|
381
416
|
name: "config",
|
|
382
417
|
sessionParams: sessionParams || {},
|
|
383
418
|
};
|
|
419
|
+
const contentKey = endpointType === "bandwidth" ? "_bandwidth" : "_voiceGateway";
|
|
384
420
|
const payload = {
|
|
385
|
-
|
|
421
|
+
[contentKey]: {
|
|
386
422
|
json: {
|
|
387
423
|
activities: [activities],
|
|
388
424
|
},
|
|
@@ -7,9 +7,10 @@ const path_1 = require("path");
|
|
|
7
7
|
const helper_1 = require("../../../descriptors/voicegateway2/utils/helper");
|
|
8
8
|
const helper_2 = require("../utils/helper");
|
|
9
9
|
exports.transfer = {
|
|
10
|
-
handleInput(endpointType, params, isGenericNode, recognitionChannel, sttVendor, sttLanguage) {
|
|
10
|
+
handleInput(endpointType, params, isGenericNode, recognitionChannel, sttVendor, sttLanguage, googleModel, sttDeepgramTier, sttDeepgramModel, sttDisablePunctuation, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting) {
|
|
11
11
|
try {
|
|
12
12
|
switch (endpointType) {
|
|
13
|
+
case "bandwidth":
|
|
13
14
|
case "audioCodes":
|
|
14
15
|
if (isGenericNode && params.transferSipHeaders) {
|
|
15
16
|
let headers = [];
|
|
@@ -22,18 +23,18 @@ exports.transfer = {
|
|
|
22
23
|
;
|
|
23
24
|
params.transferSipHeaders = headers;
|
|
24
25
|
}
|
|
25
|
-
return this.handleAudioCodesInput((0, exports.prepareTransferParams)(params));
|
|
26
|
+
return this.handleAudioCodesInput((0, exports.prepareTransferParams)(params), endpointType);
|
|
26
27
|
case "voiceGateway2":
|
|
27
28
|
default:
|
|
28
|
-
return this.handleVGInput((0, exports.prepareTransferParams)(params), recognitionChannel, sttVendor, sttLanguage);
|
|
29
|
+
return this.handleVGInput((0, exports.prepareTransferParams)(params), recognitionChannel, sttVendor, sttLanguage, googleModel, sttDeepgramTier, sttDeepgramModel, sttDisablePunctuation, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting);
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
catch (error) {
|
|
32
33
|
throw Error(error.message);
|
|
33
34
|
}
|
|
34
35
|
},
|
|
35
|
-
handleVGInput(transferParam, recognitionChannel, sttVendor, sttLanguage) {
|
|
36
|
-
const { transferType, transferTarget, transferReason, useTransferSipHeaders, transferSipHeaders, dialMusic, dialTranscriptionWebhook, dialCallerId, amdEnabled, amdRedirectOnMachineDetected, amdRedirectText, } = transferParam;
|
|
36
|
+
handleVGInput(transferParam, recognitionChannel, sttVendor, sttLanguage, googleModel, sttDeepgramTier, sttDeepgramModel, sttDisablePunctuation, deepgramEndpointing, deepgramEndpointingValue, deepgramSmartFormatting) {
|
|
37
|
+
const { transferType, transferTarget, transferReason, referredBy, useTransferSipHeaders, transferSipHeaders, dialMusic, dialTranscriptionWebhook, dialCallerId, amdEnabled, amdRedirectOnMachineDetected, amdRedirectText, dialTimeout, sttLabel } = transferParam;
|
|
37
38
|
const payload = {
|
|
38
39
|
_voiceGateway2: {
|
|
39
40
|
json: {}
|
|
@@ -51,6 +52,7 @@ exports.transfer = {
|
|
|
51
52
|
actionHook: "dial",
|
|
52
53
|
headers,
|
|
53
54
|
target: [],
|
|
55
|
+
timeout: dialTimeout !== null && dialTimeout !== void 0 ? dialTimeout : 60
|
|
54
56
|
};
|
|
55
57
|
if (amdEnabled) {
|
|
56
58
|
dialVerb.amd = {
|
|
@@ -95,9 +97,25 @@ exports.transfer = {
|
|
|
95
97
|
transcribeVerb.channel = 2;
|
|
96
98
|
break;
|
|
97
99
|
}
|
|
98
|
-
if (sttVendor) {
|
|
100
|
+
if (sttVendor !== 'none') {
|
|
99
101
|
recognizer.vendor = sttVendor;
|
|
100
102
|
recognizer.language = sttLanguage;
|
|
103
|
+
recognizer.punctuation = !sttDisablePunctuation;
|
|
104
|
+
if (googleModel && recognizer.vendor === 'google') {
|
|
105
|
+
recognizer.model = googleModel;
|
|
106
|
+
}
|
|
107
|
+
if (recognizer.vendor === 'deepgram') {
|
|
108
|
+
recognizer.deepgramOptions = {
|
|
109
|
+
tier: sttDeepgramTier,
|
|
110
|
+
model: sttDeepgramModel,
|
|
111
|
+
punctuate: !sttDisablePunctuation,
|
|
112
|
+
endpointing: deepgramEndpointing ? deepgramEndpointingValue : false,
|
|
113
|
+
smartFormatting: deepgramSmartFormatting !== null && deepgramSmartFormatting !== void 0 ? deepgramSmartFormatting : false
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
if (sttLabel) {
|
|
117
|
+
recognizer.label = sttLabel;
|
|
118
|
+
}
|
|
101
119
|
}
|
|
102
120
|
}
|
|
103
121
|
if (Object.keys(transcribeVerb).length > 0) {
|
|
@@ -131,13 +149,16 @@ exports.transfer = {
|
|
|
131
149
|
"actionHook": 'refer',
|
|
132
150
|
headers
|
|
133
151
|
};
|
|
152
|
+
if (referredBy) {
|
|
153
|
+
referVerb["referredBy"] = referredBy;
|
|
154
|
+
}
|
|
134
155
|
payload._voiceGateway2.json["sip:refer"] = referVerb;
|
|
135
156
|
break;
|
|
136
157
|
}
|
|
137
158
|
return payload;
|
|
138
159
|
},
|
|
139
|
-
handleAudioCodesInput(transferParam) {
|
|
140
|
-
const { transferReason, transferTarget, useTransferSipHeaders, transferSipHeaders, transferNotifications, transferNotificationsHangupMS, transferReferredByURL } = transferParam;
|
|
160
|
+
handleAudioCodesInput(transferParam, endpointType = "audioCodes") {
|
|
161
|
+
const { transferReason, transferTarget, useTransferSipHeaders, transferSipHeaders, transferNotifications, transferNotificationsHangupMS, transferReferredByURL, referredBy } = transferParam;
|
|
141
162
|
const activities = {
|
|
142
163
|
"type": "event",
|
|
143
164
|
"name": "transfer",
|
|
@@ -150,6 +171,10 @@ exports.transfer = {
|
|
|
150
171
|
activities.activityParams["transferReferredByURL"] = transferReferredByURL;
|
|
151
172
|
}
|
|
152
173
|
;
|
|
174
|
+
if (referredBy) {
|
|
175
|
+
activities.activityParams["transferReferredByURL"] = referredBy;
|
|
176
|
+
}
|
|
177
|
+
;
|
|
153
178
|
if (useTransferSipHeaders) {
|
|
154
179
|
activities.activityParams["transferSipHeaders"] = transferSipHeaders;
|
|
155
180
|
}
|
|
@@ -159,19 +184,20 @@ exports.transfer = {
|
|
|
159
184
|
activities.activityParams["transferNotificationsHangupMS"] = transferNotificationsHangupMS;
|
|
160
185
|
}
|
|
161
186
|
;
|
|
187
|
+
const contentKey = endpointType === "bandwidth" ? "_bandwidth" : "_voiceGateway";
|
|
162
188
|
const payload = {
|
|
163
|
-
|
|
189
|
+
[contentKey]: {
|
|
164
190
|
json: {
|
|
165
191
|
activities: [activities]
|
|
166
|
-
}
|
|
167
|
-
}
|
|
192
|
+
},
|
|
193
|
+
},
|
|
168
194
|
};
|
|
169
195
|
return payload;
|
|
170
196
|
}
|
|
171
197
|
};
|
|
172
198
|
const prepareTransferParams = (transferParam) => {
|
|
173
|
-
const { transferReason, dialMusic, dialTranscriptionWebhook } = transferParam;
|
|
174
|
-
return Object.assign(Object.assign({}, transferParam), { transferReason: transferReason === null || transferReason === void 0 ? void 0 : transferReason.trim(), dialMusic: dialMusic === null || dialMusic === void 0 ? void 0 : dialMusic.trim(), dialTranscriptionWebhook: dialTranscriptionWebhook === null || dialTranscriptionWebhook === void 0 ? void 0 : dialTranscriptionWebhook.trim() });
|
|
199
|
+
const { transferReason, dialMusic, dialTranscriptionWebhook, referredBy } = transferParam;
|
|
200
|
+
return Object.assign(Object.assign({}, transferParam), { transferReason: transferReason === null || transferReason === void 0 ? void 0 : transferReason.trim(), dialMusic: dialMusic === null || dialMusic === void 0 ? void 0 : dialMusic.trim(), dialTranscriptionWebhook: dialTranscriptionWebhook === null || dialTranscriptionWebhook === void 0 ? void 0 : dialTranscriptionWebhook.trim(), referredBy: referredBy === null || referredBy === void 0 ? void 0 : referredBy.trim() });
|
|
175
201
|
};
|
|
176
202
|
exports.prepareTransferParams = prepareTransferParams;
|
|
177
203
|
//# sourceMappingURL=transfer.mapper.js.map
|
|
@@ -51,7 +51,7 @@ exports.PLAY = (0, createNodeDescriptor_1.createNodeDescriptor)({
|
|
|
51
51
|
key: "params_stt",
|
|
52
52
|
label: "UI__NODE_EDITOR__PLAY__SECTIONS__STT__LABEL",
|
|
53
53
|
defaultCollapsed: true,
|
|
54
|
-
fields: ["sttVendor", "sttHints", "enableAdvancedSTTConfig", "azureSttContextId", "azureEnableAudioLogging"],
|
|
54
|
+
fields: ["sttVendor", "sttDeepgramTier", "sttHints", "enableAdvancedSTTConfig", "azureSttContextId", "azureEnableAudioLogging", "googleModel"],
|
|
55
55
|
condition: {
|
|
56
56
|
key: "setActivityParams",
|
|
57
57
|
value: true
|
|
@@ -6,6 +6,7 @@ const createNodeDescriptor_1 = require("../../../createNodeDescriptor");
|
|
|
6
6
|
/** Helper Modules */
|
|
7
7
|
const setSessionConfig_mapper_1 = require("../mappers/setSessionConfig.mapper");
|
|
8
8
|
const design_1 = require("../utils/design");
|
|
9
|
+
const vgConstants_1 = require("../utils/vgConstants");
|
|
9
10
|
exports.voiceConfigFields = [
|
|
10
11
|
{
|
|
11
12
|
key: "sttVendor",
|
|
@@ -87,19 +88,80 @@ exports.voiceConfigFields = [
|
|
|
87
88
|
or: [
|
|
88
89
|
{
|
|
89
90
|
key: "sttVendor",
|
|
90
|
-
value: "
|
|
91
|
+
value: "google",
|
|
91
92
|
},
|
|
92
93
|
{
|
|
93
94
|
key: "sttVendor",
|
|
94
|
-
value: "
|
|
95
|
+
value: "deepgram",
|
|
95
96
|
},
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: "sttDeepgramTier",
|
|
102
|
+
type: "sttTierModelSelect",
|
|
103
|
+
label: "_unused_",
|
|
104
|
+
description: "_unused_",
|
|
105
|
+
defaultValue: "base",
|
|
106
|
+
params: {
|
|
107
|
+
languageKey: "config.sttDeepgramModel",
|
|
108
|
+
},
|
|
109
|
+
condition: {
|
|
110
|
+
key: "sttVendor",
|
|
111
|
+
value: "deepgram"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
key: "sttDeepgramModel",
|
|
116
|
+
type: "sttTierModelSelect",
|
|
117
|
+
defaultValue: "general",
|
|
118
|
+
label: "_unused_",
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
key: "deepgramEndpointing",
|
|
122
|
+
type: "toggle",
|
|
123
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING__LABEL",
|
|
124
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING__DESCRIPTION",
|
|
125
|
+
defaultValue: false,
|
|
126
|
+
condition: {
|
|
127
|
+
key: "sttVendor",
|
|
128
|
+
value: "deepgram"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
key: "deepgramEndpointingValue",
|
|
133
|
+
type: "number",
|
|
134
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING_TIME__LABEL",
|
|
135
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_ENDPOINTING_TIME__DESCRIPTION",
|
|
136
|
+
defaultValue: 1000,
|
|
137
|
+
params: {
|
|
138
|
+
min: 10,
|
|
139
|
+
max: 1000
|
|
140
|
+
},
|
|
141
|
+
condition: {
|
|
142
|
+
and: [
|
|
96
143
|
{
|
|
97
144
|
key: "sttVendor",
|
|
98
|
-
value: "
|
|
145
|
+
value: "deepgram"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
key: "deepgramEndpointing",
|
|
149
|
+
value: true
|
|
99
150
|
},
|
|
100
151
|
]
|
|
101
152
|
}
|
|
102
153
|
},
|
|
154
|
+
{
|
|
155
|
+
key: "deepgramSmartFormatting",
|
|
156
|
+
type: "toggle",
|
|
157
|
+
label: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_SMART_FORMATTING__LABEL",
|
|
158
|
+
description: "UI__NODE_EDITOR__VOICEGATEWAY2__SET_SESSION_CONFIG__DEEPGRAM_SMART_FORMATTING__DESCRIPTION",
|
|
159
|
+
defaultValue: false,
|
|
160
|
+
condition: {
|
|
161
|
+
key: "sttVendor",
|
|
162
|
+
value: "deepgram"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
103
165
|
{
|
|
104
166
|
key: "enableAdvancedSTTConfig",
|
|
105
167
|
type: "toggle",
|
|
@@ -146,34 +208,51 @@ exports.voiceConfigFields = [
|
|
|
146
208
|
}
|
|
147
209
|
},
|
|
148
210
|
{
|
|
149
|
-
key: "
|
|
150
|
-
type: "
|
|
151
|
-
label: "
|
|
152
|
-
description: "
|
|
153
|
-
defaultValue:
|
|
154
|
-
condition: {
|
|
155
|
-
key: "ttsVendor",
|
|
156
|
-
value: "microsoft"
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
key: "azureTtsDeploymentId",
|
|
161
|
-
type: "cognigyText",
|
|
162
|
-
label: "UI__NODE_EDITOR__AZURE_TTS_DEPLOYMENT_ID__LABEL",
|
|
163
|
-
description: "UI__NODE_EDITOR__AZURE_TTS_DEPLOYMENT_ID__DESCRIPTION",
|
|
164
|
-
defaultValue: "",
|
|
211
|
+
key: "googleModel",
|
|
212
|
+
type: "select",
|
|
213
|
+
label: "UI__NODE_EDITOR__GOOGLE_MODEL__LABEL",
|
|
214
|
+
description: "UI__NODE_EDITOR__GOOGLE_MODEL__DESCRIPTION",
|
|
215
|
+
defaultValue: vgConstants_1.GoogleSpeechModel.LatestShort,
|
|
165
216
|
condition: {
|
|
166
|
-
|
|
217
|
+
key: "sttVendor",
|
|
218
|
+
value: "google"
|
|
219
|
+
},
|
|
220
|
+
params: {
|
|
221
|
+
options: [
|
|
167
222
|
{
|
|
168
|
-
|
|
169
|
-
value:
|
|
223
|
+
label: "UI__NODE_EDITOR__GOOGLE_MODEL__OPTIONS__LATEST_SHORT__LABEL",
|
|
224
|
+
value: vgConstants_1.GoogleSpeechModel.LatestShort,
|
|
170
225
|
},
|
|
171
226
|
{
|
|
172
|
-
|
|
173
|
-
value:
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
227
|
+
label: "UI__NODE_EDITOR__GOOGLE_MODEL__OPTIONS__LATEST_LONG__LABEL",
|
|
228
|
+
value: vgConstants_1.GoogleSpeechModel.LatestLong,
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
label: "UI__NODE_EDITOR__GOOGLE_MODEL__OPTIONS__COMMAND_AND_SEARCH__LABEL",
|
|
232
|
+
value: vgConstants_1.GoogleSpeechModel.CommandAndSearch,
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
label: "UI__NODE_EDITOR__GOOGLE_MODEL__OPTIONS__PHONE_CALL__LABEL",
|
|
236
|
+
value: vgConstants_1.GoogleSpeechModel.PhoneCall,
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
label: "UI__NODE_EDITOR__GOOGLE_MODEL__OPTIONS__VIDEO__LABEL",
|
|
240
|
+
value: vgConstants_1.GoogleSpeechModel.Video,
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
label: "UI__NODE_EDITOR__GOOGLE_MODEL__OPTIONS__MEDICAL_DICTATION__LABEL",
|
|
244
|
+
value: vgConstants_1.GoogleSpeechModel.MedicalDictation,
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
label: "UI__NODE_EDITOR__GOOGLE_MODEL__OPTIONS__MEDICAL_CONVERSATION__LABEL",
|
|
248
|
+
value: vgConstants_1.GoogleSpeechModel.MedicalConversation,
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
label: "UI__NODE_EDITOR__GOOGLE_MODEL__OPTIONS__DEFAULT__LABEL",
|
|
252
|
+
value: vgConstants_1.GoogleSpeechModel.Default,
|
|
253
|
+
},
|
|
254
|
+
],
|
|
255
|
+
},
|
|
177
256
|
},
|
|
178
257
|
{
|
|
179
258
|
key: "ttsVendor",
|
|
@@ -182,10 +261,17 @@ exports.voiceConfigFields = [
|
|
|
182
261
|
label: "_unused_",
|
|
183
262
|
description: "_unused_",
|
|
184
263
|
params: {
|
|
264
|
+
modelKey: "config.ttsModel",
|
|
185
265
|
languageKey: "config.ttsLanguage",
|
|
186
266
|
voiceKey: "config.ttsVoice"
|
|
187
267
|
}
|
|
188
268
|
},
|
|
269
|
+
{
|
|
270
|
+
key: "ttsModel",
|
|
271
|
+
type: "ttsSelect",
|
|
272
|
+
defaultValue: "",
|
|
273
|
+
label: "_unused_"
|
|
274
|
+
},
|
|
189
275
|
{
|
|
190
276
|
key: "ttsVoice",
|
|
191
277
|
type: "ttsSelect",
|
|
@@ -215,19 +301,24 @@ exports.SESSION_SPEECH_PARAMETERS = (0, createNodeDescriptor_1.createNodeDescrip
|
|
|
215
301
|
defaultCollapsed: true,
|
|
216
302
|
fields: [
|
|
217
303
|
"sttVendor",
|
|
304
|
+
"sttDeepgramTier",
|
|
305
|
+
"deepgramEndpointing",
|
|
306
|
+
"deepgramEndpointingValue",
|
|
307
|
+
"deepgramSmartFormatting",
|
|
218
308
|
"sttHints",
|
|
219
309
|
"sttHintsDynamicHints",
|
|
310
|
+
"googleModel",
|
|
220
311
|
"sttDisablePunctuation",
|
|
221
312
|
"enableAdvancedSTTConfig",
|
|
222
313
|
"azureSttContextId",
|
|
223
|
-
"azureEnableAudioLogging"
|
|
314
|
+
"azureEnableAudioLogging"
|
|
224
315
|
],
|
|
225
316
|
},
|
|
226
317
|
{
|
|
227
318
|
key: "params_tts",
|
|
228
319
|
label: "UI__NODE_EDITOR__SESSION_SPEECH_PARAMETERS__SECTIONS__PARAMS_TTS__LABEL",
|
|
229
320
|
defaultCollapsed: true,
|
|
230
|
-
fields: ["ttsVendor"
|
|
321
|
+
fields: ["ttsVendor"],
|
|
231
322
|
},
|
|
232
323
|
],
|
|
233
324
|
form: [
|