@onereach/step-voice 6.1.6 → 6.1.7-customvoiceimp.1
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/Custom Voice Input.d.ts +2 -0
- package/dst/Custom Voice Input.js +16 -13
- package/package.json +1 -1
|
@@ -104,19 +104,10 @@ class CustomVoiceInput extends voice_1.default {
|
|
|
104
104
|
.join(' | ')
|
|
105
105
|
.value();
|
|
106
106
|
// On bargeIn, we should stop playback
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
reportingSettingsKey,
|
|
112
|
-
action: 'Call Recognition',
|
|
113
|
-
actionFromBot: false
|
|
114
|
-
});
|
|
115
|
-
await this.resumeRecording(call, sensitiveData);
|
|
116
|
-
// There might be hooks after this step which we will try to avoid
|
|
117
|
-
return this.exitStep(exitId, this.exitChoiceData('voice', params));
|
|
118
|
-
}
|
|
119
|
-
else if (this.rptsHasMore({ repromptsList }) &&
|
|
107
|
+
console.log('this.rptsHasMore({ repromptsList })', this.rptsHasMore({ repromptsList }));
|
|
108
|
+
console.log('usePromptsTriggers', usePromptsTriggers);
|
|
109
|
+
console.log('isRepromptTrigger(phrases, this.data.promptsTriggers)', isRepromptTrigger(phrases, this.data.promptsTriggers));
|
|
110
|
+
if (this.rptsHasMore({ repromptsList }) &&
|
|
120
111
|
(usePromptsTriggers ? isRepromptTrigger(phrases, this.data.promptsTriggers) : true)) {
|
|
121
112
|
await this.transcript(call, {
|
|
122
113
|
message: 'Unrecognized',
|
|
@@ -136,6 +127,18 @@ class CustomVoiceInput extends voice_1.default {
|
|
|
136
127
|
});
|
|
137
128
|
return this.exitFlow();
|
|
138
129
|
}
|
|
130
|
+
else if (exitExists(exitId)) {
|
|
131
|
+
await this.transcript(call, {
|
|
132
|
+
message: lodash_1.default.replace(this.getExitStepLabel(exitId) ?? '', /^(\d+\. )?(~ )?/, ''),
|
|
133
|
+
voiceProcessResult,
|
|
134
|
+
reportingSettingsKey,
|
|
135
|
+
action: 'Call Recognition',
|
|
136
|
+
actionFromBot: false
|
|
137
|
+
});
|
|
138
|
+
await this.resumeRecording(call, sensitiveData);
|
|
139
|
+
// There might be hooks after this step which we will try to avoid
|
|
140
|
+
return this.exitStep(exitId, this.exitChoiceData('voice', params));
|
|
141
|
+
}
|
|
139
142
|
// There's no more reprompts, should move on to unrecognized direction
|
|
140
143
|
await this.transcript(call, {
|
|
141
144
|
message: 'Not Recognized',
|