Skip to content

Commit ff97d25

Browse files
committed
Code Tidy
1 parent 80c7a5d commit ff97d25

3 files changed

Lines changed: 2 additions & 22 deletions

File tree

services/conversation/v1-workspace-manager.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,6 @@ module.exports = function (RED) {
506506
function executeMethod(node, method, params, msg) {
507507
var conv = null,
508508
serviceSettings = {
509-
//username: username,
510-
//password: password,
511509
version_date: '2018-02-16',
512510
version: '2018-02-16',
513511
headers: {

services/speech_to_text/v1.js

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616

1717
module.exports = function (RED) {
1818
const SERVICE_IDENTIFIER = 'speech-to-text';
19-
var request = require('request'),
20-
cfenv = require('cfenv'),
19+
var cfenv = require('cfenv'),
2120
temp = require('temp'),
2221
url = require('url'),
2322
fs = require('fs'),
@@ -273,6 +272,7 @@ module.exports = function (RED) {
273272

274273
function determineTokenService(stt) {
275274
let tokenService = new AuthV1(stt.getCredentials());
275+
276276
// Streaming - IAM Key fudge.
277277
// Check if the token service options have the header set. If not then
278278
// create them. This will stop the function from crashing the app,
@@ -287,10 +287,6 @@ module.exports = function (RED) {
287287
var p = new Promise(function resolver(resolve, reject){
288288
var model = config.lang + '_' + config.band,
289289
params = {};
290-
//speech_to_text = null;
291-
292-
//speech_to_text = determineService();
293-
294290

295291
// If we get to here then the audio is in one of the supported formats.
296292
if (audioData.format === 'ogg') {
@@ -516,20 +512,7 @@ module.exports = function (RED) {
516512
return p;
517513
}
518514

519-
520-
function init() {
521-
return Promise.resolve();
522-
}
523-
524-
function performStreamSTTIAM(speech_to_text, audioData) {
525-
var p = new Promise(function resolver(resolve, reject) {
526-
reject('Streaming with IAM Key not yet implemented');
527-
});
528-
return p;
529-
}
530-
531515
function performStreamSTT(speech_to_text, audioData) {
532-
//var speech_to_text = determineService();
533516
var delay = 1000;
534517
var p = getToken(speech_to_text)
535518
.then(() => {

utilities/tone-utils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ ToneUtils.prototype = {
4242
// Function that checks the payload and determines
4343
// whether it is JSON or a Buffer
4444
checkPayload: function(payload) {
45-
console.log('Checking Tone Payload');
4645
var message = null,
4746
isJSON = this.isJsonString(payload) || this.isJsonObject(payload);
4847

0 commit comments

Comments
 (0)