@@ -23,7 +23,7 @@ module.exports = function (RED) {
2323 var fileType = require ( 'file-type' ) ;
2424 var watson = require ( 'watson-developer-cloud' ) ;
2525
26- var service = cfenv . getAppEnv ( ) . getServiceCreds ( / s p e e c h t o t e x t / i)
26+ var service = cfenv . getAppEnv ( ) . getServiceCreds ( / s p e e c h t o t e x t / i) ;
2727
2828 // Require the Cloud Foundry Module to pull credentials from bound service
2929 // If they are found then the username and password will be stored in
@@ -77,7 +77,7 @@ module.exports = function (RED) {
7777
7878 // Utility function to perform a URL validation check
7979 function urlCheck ( str ) {
80- var parsed = url . parse ( str )
80+ var parsed = url . parse ( str ) ;
8181
8282 return ( ! ! parsed . hostname && ! ! parsed . protocol && str . indexOf ( ' ' ) < 0 ) ;
8383 }
@@ -102,7 +102,7 @@ module.exports = function (RED) {
102102 if ( err ) {
103103 throw err ;
104104 }
105- cb ( fileType ( buf ) . ext )
105+ cb ( fileType ( buf ) . ext ) ;
106106 } ) ;
107107 } ) ;
108108
@@ -139,12 +139,12 @@ module.exports = function (RED) {
139139 // console.log(a.alternatives);
140140 a . alternatives . forEach ( function ( t ) {
141141 msg . transcription += t . transcript ;
142- } )
142+ } ) ;
143143 } ) ;
144144 }
145145 node . send ( msg ) ;
146146 }
147- }
147+ } ;
148148
149149
150150 // Utility function that performs the speech to text service call.
@@ -177,7 +177,7 @@ module.exports = function (RED) {
177177
178178 // Everything is now in place to invoke the service
179179 speech_to_text . recognize ( params , function ( err , res ) {
180- node . status ( { } )
180+ node . status ( { } ) ;
181181 cbdone ( err , res ) ;
182182 if ( cbcleanup ) {
183183 cbcleanup ( ) ;
@@ -205,21 +205,21 @@ module.exports = function (RED) {
205205 if ( ! username || ! password ) {
206206 var message_err_credentials = 'Missing Speech To Text service credentials' ;
207207
208- node . error ( message_err_credentials , msg )
208+ node . error ( message_err_credentials , msg ) ;
209209 return ;
210210 }
211211
212212 if ( ! config . lang ) {
213213 var message_err_lang = 'Missing audio language configuration, unable to process speech.' ;
214214
215- node . error ( message_err_lang , msg )
215+ node . error ( message_err_lang , msg ) ;
216216 return ;
217217 }
218218
219219 if ( ! config . band ) {
220220 var message_err_band = 'Missing audio quality configuration, unable to process speech.' ;
221221
222- node . error ( message_err_band , msg )
222+ node . error ( message_err_band , msg ) ;
223223 return ;
224224 }
225225
@@ -228,7 +228,7 @@ module.exports = function (RED) {
228228 if ( ! config . continuous ) {
229229 var message_err_continuous = 'Missing continuous details, unable to process speech.' ;
230230
231- node . error ( message_err_continuous , msg )
231+ node . error ( message_err_continuous , msg ) ;
232232 return ;
233233 }
234234
@@ -237,7 +237,7 @@ module.exports = function (RED) {
237237 if ( ! msg . payload instanceof Buffer || ! typeof msg . payload === 'string' ) {
238238 message = 'Invalid property: msg.payload, can only be a URL or a Buffer.' ;
239239
240- node . error ( message , msg )
240+ node . error ( message , msg ) ;
241241 return ;
242242 }
243243
@@ -262,7 +262,7 @@ module.exports = function (RED) {
262262 var message_err_format
263263 = 'Audio format (' + f + ') not supported, must be encoded as WAV, FLAC or OGG.' ;
264264
265- node . error ( message_err_format , msg )
265+ node . error ( message_err_format , msg ) ;
266266 return ;
267267 }
268268 }
0 commit comments