File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ module.exports = function getModels(options) {
5454 } ;
5555 var url = options . url || 'https://stream.watsonplatform.net/speech-to-text/api' ;
5656 if ( options . access_token ) {
57- url = url + ' /v1/models?access_token=' + options . access_token ;
57+ url = ` ${ url } /v1/models?access_token=${ options . access_token } ` ;
5858 } else {
59- url = url + ' /v1/models?watson-token=' + options . token ;
59+ url = ` ${ url } /v1/models?access_token= ${ options . token } ` ;
6060 }
6161 return fetch ( url , reqOpts )
6262 . then ( function ( response ) {
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ module.exports = function getVoices(options) {
5555 } ;
5656 var url = options . url || 'https://stream.watsonplatform.net/text-to-speech/api' ;
5757 if ( options . access_token ) {
58- url = url + '/v1/voices?watson-token=' + options . access_token ;
58+ url = ` ${ url } '/v1/voices?watson-token='${ options . access_token } ` ;
5959 } else {
60- url = url + '/v1/voices?watson-token=' + options . token ;
60+ url = ` ${ url } '/v1/voices?watson-token='${ options . token } ` ;
6161 }
6262 return fetch ( url , reqOpts )
6363 . then ( function ( response ) {
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ module.exports = function synthesize(options) {
5151 var url = options . url || 'https://stream.watsonplatform.net/text-to-speech/api' ;
5252 var audio = options . element || new Audio ( ) ;
5353 audio . crossOrigin = 'anonymous' ;
54- audio . src = url + ' /v1/synthesize?' + qs . stringify ( pick ( options , QUERY_PARAMS_ALLOWED ) ) ;
54+ audio . src = ` ${ url } /v1/synthesize?${ qs . stringify ( pick ( options , QUERY_PARAMS_ALLOWED ) ) } ` ;
5555 if ( options . autoPlay !== false ) {
5656 audio . play ( ) ;
5757 }
You can’t perform that action at this time.
0 commit comments