File tree 3 files changed +5
-5
lines changed
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) {
54
54
} ;
55
55
var url = options . url || 'https://stream.watsonplatform.net/speech-to-text/api' ;
56
56
if ( options . access_token ) {
57
- url = ` ${ url } /v1/models?access_token=${ options . access_token } ` ;
57
+ url = url + ' /v1/models?access_token=' + options . access_token ;
58
58
} else {
59
- url = ` ${ url } /v1/models?access_token=${ options . token } ` ;
59
+ url = url + ' /v1/models?access_token=' + options . token ;
60
60
}
61
61
return fetch ( url , reqOpts )
62
62
. then ( function ( response ) {
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ module.exports = function getVoices(options) {
55
55
} ;
56
56
var url = options . url || 'https://stream.watsonplatform.net/text-to-speech/api' ;
57
57
if ( options . access_token ) {
58
- url = ` ${ url } '/v1/voices?watson-token='${ options . access_token } ` ;
58
+ url = url + '/v1/voices?watson-token=' + options . access_token ;
59
59
} else {
60
- url = ` ${ url } '/v1/voices?watson-token='${ options . token } ` ;
60
+ url = url + '/v1/voices?watson-token=' + options . token ;
61
61
}
62
62
return fetch ( url , reqOpts )
63
63
. then ( function ( response ) {
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ module.exports = function synthesize(options) {
51
51
var url = options . url || 'https://stream.watsonplatform.net/text-to-speech/api' ;
52
52
var audio = options . element || new Audio ( ) ;
53
53
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 ) ) ;
55
55
if ( options . autoPlay !== false ) {
56
56
audio . play ( ) ;
57
57
}
You can’t perform that action at this time.
0 commit comments