@onereach/step-voice 4.0.25 → 4.0.29
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/dst/Choice.d.ts +1 -0
- package/dst/Choice.js +5 -4
- package/dst/Keypad Input.d.ts +1 -0
- package/dst/Keypad Input.js +3 -2
- package/dst/step.js +1 -1
- package/package.json +2 -1
package/dst/Choice.d.ts
CHANGED
package/dst/Choice.js
CHANGED
|
@@ -34,7 +34,7 @@ const getPhrasesForSpeechRec = (choices) => {
|
|
|
34
34
|
}
|
|
35
35
|
return texts;
|
|
36
36
|
};
|
|
37
|
-
const getAsrSettings = (settings, choices) => {
|
|
37
|
+
const getAsrSettings = (settings, choices, recognitionModel) => {
|
|
38
38
|
if (settings.engine === 'google' || settings.engine === 'google_beta') {
|
|
39
39
|
return {
|
|
40
40
|
...settings,
|
|
@@ -43,7 +43,8 @@ const getAsrSettings = (settings, choices) => {
|
|
|
43
43
|
{
|
|
44
44
|
phrases: getPhrasesForSpeechRec(choices)
|
|
45
45
|
}
|
|
46
|
-
]
|
|
46
|
+
],
|
|
47
|
+
recognitionModel
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
}
|
|
@@ -68,13 +69,13 @@ const isRepromptTrigger = (recogResult, promptsTriggers) => {
|
|
|
68
69
|
class Choice extends voice_1.default {
|
|
69
70
|
async runStep() {
|
|
70
71
|
const channel = await this.fetchData();
|
|
71
|
-
const { textType, asr, tts, sensitiveData, noReplyDelay, usePromptsTriggers } = this.data;
|
|
72
|
+
const { textType, asr, tts, sensitiveData, noReplyDelay, usePromptsTriggers, recognitionModel } = this.data;
|
|
72
73
|
const exitExists = (exitId) => {
|
|
73
74
|
return lodash_1.default.some(choices, (choice) => choice.exitId === exitId);
|
|
74
75
|
};
|
|
75
76
|
const choices = this.buildChoices({ choices: this.data.choices });
|
|
76
77
|
const ttsSettings = tts.getSettings(channel.tts);
|
|
77
|
-
const asrSettings = getAsrSettings(asr.getSettings(channel.asr), choices);
|
|
78
|
+
const asrSettings = getAsrSettings(asr.getSettings(channel.asr), choices, recognitionModel);
|
|
78
79
|
const repromptsList = this.buildReprompts({ prompts: this.data.prompts });
|
|
79
80
|
const speechSections = this.buildSections({ sections: this.data.audio, textType, ttsSettings });
|
|
80
81
|
const grammar = {
|
package/dst/Keypad Input.d.ts
CHANGED
package/dst/Keypad Input.js
CHANGED
|
@@ -26,7 +26,7 @@ const validateInput = ({ input = '', type, regex, expectedLength }) => {
|
|
|
26
26
|
class KeypadInput extends voice_1.default {
|
|
27
27
|
async runStep() {
|
|
28
28
|
const channel = await this.fetchData();
|
|
29
|
-
const { interTimeout, asr, tts, noReplyDelay, textType, keypadBargeIn, endInput, terminationKey, endUserInputValidationOther, expectedNumberOfDigits, regExToValidate, mfVersion, sensitiveData } = this.data;
|
|
29
|
+
const { interTimeout, asr, tts, noReplyDelay, textType, keypadBargeIn, endInput, terminationKey, endUserInputValidationOther, expectedNumberOfDigits, regExToValidate, mfVersion, sensitiveData, recognitionModel } = this.data;
|
|
30
30
|
const interDigitTimeout = Number(interTimeout) * 1000;
|
|
31
31
|
const ttsSettings = tts.getSettings(channel.tts);
|
|
32
32
|
const asrSettings = asr.getSettings(channel.asr);
|
|
@@ -35,7 +35,8 @@ class KeypadInput extends voice_1.default {
|
|
|
35
35
|
asr: {
|
|
36
36
|
...asrSettings,
|
|
37
37
|
config: {
|
|
38
|
-
version: 'v1beta'
|
|
38
|
+
version: 'v1beta',
|
|
39
|
+
recognitionModel
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
};
|
package/dst/step.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/step-voice",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.29",
|
|
4
4
|
"author": "Roman Zolotarov <roman.zolotarov@onereach.com>",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Roman Zolotarov",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"download-dev": "sh scripts/download.sh dev",
|
|
48
48
|
"upload-prod": "sh scripts/upload.sh prod",
|
|
49
49
|
"upload-dev": "sh scripts/upload.sh dev",
|
|
50
|
+
"publish-patch": "npm run build && npm version patch && npm publish",
|
|
50
51
|
"test": "jest"
|
|
51
52
|
},
|
|
52
53
|
"repository": {
|