mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
log gather payload at info
This commit is contained in:
@@ -1137,15 +1137,18 @@ class TaskGather extends SttTask {
|
||||
if (this.parentTask) this.parentTask.emit('dtmf', evt);
|
||||
else {
|
||||
this.emit('dtmf', evt);
|
||||
returnedVerbs = await this.performAction({digits: this.digitBuffer, reason: 'dtmfDetected'});
|
||||
const payload = {digits: this.digitBuffer, reason: 'dtmfDetected'};
|
||||
this.logger.info({payload}, 'TaskGather:_resolve - sending dtmf event to app');
|
||||
returnedVerbs = await this.performAction(payload);
|
||||
}
|
||||
}
|
||||
else if (reason.startsWith('speech')) {
|
||||
if (this.parentTask) this.parentTask.emit('transcription', evt);
|
||||
else {
|
||||
this.emit('transcription', evt);
|
||||
this.logger.debug('TaskGather:_resolve - invoking performAction');
|
||||
returnedVerbs = await this.performAction({speech: evt, reason: 'speechDetected'});
|
||||
const payload = {speech: evt, reason: 'speechDetected'};
|
||||
this.logger.info({payload}, 'TaskGather:_resolve - sending speech transcript to app');
|
||||
returnedVerbs = await this.performAction(payload);
|
||||
this.logger.debug({returnedVerbs}, 'TaskGather:_resolve - back from performAction');
|
||||
}
|
||||
}
|
||||
@@ -1153,6 +1156,7 @@ class TaskGather extends SttTask {
|
||||
if (this.parentTask) this.parentTask.emit('timeout', evt);
|
||||
else {
|
||||
this.emit('timeout', evt);
|
||||
this.logger.info('TaskGather:_resolve - sending timeout event to app');
|
||||
returnedVerbs = await this.performAction({reason: 'timeout'});
|
||||
}
|
||||
}
|
||||
@@ -1160,12 +1164,15 @@ class TaskGather extends SttTask {
|
||||
if (this.parentTask) this.parentTask.emit('stt-error', evt);
|
||||
else {
|
||||
this.emit('stt-error', evt);
|
||||
returnedVerbs = await this.performAction({reason: 'error', details: evt.error});
|
||||
const payload = {reason: 'stt-error', details: evt.error};
|
||||
this.logger.info({payload}, 'TaskGather:_resolve - sending stt-error event to app');
|
||||
returnedVerbs = await this.performAction(payload);
|
||||
}
|
||||
} else if (reason.startsWith('stt-low-confidence')) {
|
||||
if (this.parentTask) this.parentTask.emit('stt-low-confidence', evt);
|
||||
else {
|
||||
this.emit('stt-low-confidence', evt);
|
||||
this.logger.info('TaskGather:_resolve - sending stt-low-confidence event to app');
|
||||
returnedVerbs = await this.performAction({reason: 'stt-low-confidence'});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user