create gather without a prompt

This commit is contained in:
akirilyuk
2022-02-01 15:19:05 +01:00
parent 4e76077dc9
commit 95188f59ec

View File

@@ -51,13 +51,23 @@ class SpeechConfig extends Emitter {
const minBargeinWordCount = speechBargein ? (bargein.minWordCount || 1) : 0;
const {interDigitTimeout = 0, maxDigits, minDigits = 1, submitDigit} = (opts.dtmf || {});
const {noInputTimeout, noInputRetries, noInputSpeech, noInputUrl} = (opts.user || {});
const sayConfig = {
text: textPrompt,
synthesizer: opts.synthesizer
};
const playConfig = {
url: urlPrompt
};
let sayConfig;
let playConfig;
if (textPrompt) {
sayConfig = {
text: textPrompt,
synthesizer: opts.synthesizer
};
}
if (urlPrompt) {
playConfig = {
url: urlPrompt
};
}
const config = {
input,
listenDuringPrompt: speechBargein,