Skip to content

Commit b2803d5

Browse files
committed
Report on more STT on.error responses
1 parent 6863ae2 commit b2803d5

File tree

1 file changed

+8
-1
lines changed
  • services/speech_to_text

1 file changed

+8
-1
lines changed

services/speech_to_text/v1.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ module.exports = function (RED) {
423423

424424
ws.on('error', (err) => {
425425
socketListening = false;
426+
payloadutils.reportError(node,newMsg,err);
426427
// console.log('Error Detected');
427428
if (initialConnect) {
428429
//reject(err);
@@ -468,7 +469,13 @@ module.exports = function (RED) {
468469
if (audioStack && audioStack.length) {
469470
audioStack.forEach((a) => {
470471
if (a && a.action && 'data' === a.action) {
471-
websocket.send(a.data);
472+
//websocket.send(a.data);
473+
websocket.send(a.data, (error) => {
474+
if (error) {
475+
payloadutils.reportError(node,{},error);
476+
} else {
477+
}
478+
});
472479
}
473480
});
474481
audioStack = [];

0 commit comments

Comments
 (0)