mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 17:17:58 +00:00
add more logs
This commit is contained in:
@@ -99,6 +99,7 @@ class TaskGather extends Task {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const startListening = (cs, ep) => {
|
const startListening = (cs, ep) => {
|
||||||
|
this.logger.info("started listening for speech events via startListening");
|
||||||
this._startTimer();
|
this._startTimer();
|
||||||
if (this.input.includes('speech') && !this.listenDuringPrompt) {
|
if (this.input.includes('speech') && !this.listenDuringPrompt) {
|
||||||
this._initSpeech(cs, ep)
|
this._initSpeech(cs, ep)
|
||||||
@@ -115,7 +116,7 @@ class TaskGather extends Task {
|
|||||||
this.sayTask.exec(cs, ep); // kicked off, _not_ waiting for it to complete
|
this.sayTask.exec(cs, ep); // kicked off, _not_ waiting for it to complete
|
||||||
this.sayTask.on('playDone', (err) => {
|
this.sayTask.on('playDone', (err) => {
|
||||||
if (err) return this.logger.error({err}, 'Gather:exec Error playing tts');
|
if (err) return this.logger.error({err}, 'Gather:exec Error playing tts');
|
||||||
this.logger.debug('Gather: say task completed');
|
this.logger.info({killed: this.killed, listenAfterSpeech: this.listenAfterSpeech }, 'Gather: say task completed');
|
||||||
if (!this.killed) {
|
if (!this.killed) {
|
||||||
if (this.listenAfterSpeech === true) {
|
if (this.listenAfterSpeech === true) {
|
||||||
startListening(cs, ep);
|
startListening(cs, ep);
|
||||||
@@ -256,6 +257,7 @@ class TaskGather extends Task {
|
|||||||
ep.addCustomEventListener(AzureTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep));
|
ep.addCustomEventListener(AzureTranscriptionEvents.Transcription, this._onTranscription.bind(this, cs, ep));
|
||||||
ep.addCustomEventListener(AzureTranscriptionEvents.NoSpeechDetected, this._onNoSpeechDetected.bind(this, cs, ep));
|
ep.addCustomEventListener(AzureTranscriptionEvents.NoSpeechDetected, this._onNoSpeechDetected.bind(this, cs, ep));
|
||||||
}
|
}
|
||||||
|
this.logger.info("started listening on speech events");
|
||||||
await ep.set(opts)
|
await ep.set(opts)
|
||||||
.catch((err) => this.logger.info(err, 'Error setting channel variables'));
|
.catch((err) => this.logger.info(err, 'Error setting channel variables'));
|
||||||
}
|
}
|
||||||
@@ -350,6 +352,7 @@ class TaskGather extends Task {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onEndOfUtterance(cs, ep) {
|
_onEndOfUtterance(cs, ep) {
|
||||||
this.logger.info('TaskGather:_onEndOfUtterance');
|
this.logger.info('TaskGather:_onEndOfUtterance');
|
||||||
if (!this.resolved && !this.killed) {
|
if (!this.resolved && !this.killed) {
|
||||||
|
|||||||
Reference in New Issue
Block a user