Skip to content

Commit ad35dc4

Browse files
committed
Implement Add Words
1 parent ca2bb04 commit ad35dc4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

services/speech_to_text/v1-corpus-builder.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ module.exports = function (RED) {
269269
case 'addWords':
270270
try {
271271
params.words = JSON.parse(fs.readFileSync(info.path, 'utf8'));
272-
}
273-
catch (err) {
272+
} catch (err) {
274273
params.words = fs.createReadStream(info.path);
275274
}
276275
}
@@ -348,9 +347,8 @@ module.exports = function (RED) {
348347
if (msg.payload instanceof Buffer) {
349348
loadFile(node, method, params, msg);
350349
return;
351-
} else {
352-
setFileParams(method, params, msg);
353350
}
351+
setFileParams(method, params, msg);
354352
}
355353

356354
executeMethod(node, method, params, msg);

0 commit comments

Comments
 (0)