web-speech-cognitive-services
web-speech-cognitive-services copied to clipboard
ERROR 400 using <SayButton>
Hi,
Thank you for the amazing library. I was trying to get Text to Speech to work with Cognitive Services using <SayButton> but keeps on getting a 400 error. Any direction to understand this problem will be grateful!
fetchSpeechData.js:45 POST https://westus.tts.speech.microsoft.com/cognitiveservices/v1 400
_callee$ @ fetchSpeechData.js:45
tryCatch @ runtime.js:62
invoke @ runtime.js:288
prototype.(anonymous function) @ runtime.js:114
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
_default @ fetchSpeechData.js:21
_callee2$ @ SpeechSynthesisUtterance.js:132
tryCatch @ runtime.js:62
invoke @ runtime.js:288
prototype.(anonymous function) @ runtime.js:114
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
preload @ SpeechSynthesisUtterance.js:155
_callee$ @ createSpeechSynthesisPonyfill.js:188
tryCatch @ runtime.js:62
invoke @ runtime.js:288
prototype.(anonymous function) @ runtime.js:114
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:25
Promise.then (async)
asyncGeneratorStep @ asyncToGenerator.js:13
_next @ asyncToGenerator.js:25
(anonymous) @ asyncToGenerator.js:32
(anonymous) @ asyncToGenerator.js:21
(anonymous) @ createSpeechSynthesisPonyfill.js:201
speak @ createSpeechSynthesisPonyfill.js:130
_callee$ @ Utterance.js:216
tryCatch @ runtime.js:63
invoke @ runtime.js:290
prototype.(anonymous function) @ runtime.js:116
step @ asyncToGenerator.js:21
(anonymous) @ asyncToGenerator.js:39
F @ _export.js:43
(anonymous) @ asyncToGenerator.js:18
_callee$ @ retry.js:54
tryCatch @ runtime.js:63
invoke @ runtime.js:290
prototype.(anonymous function) @ runtime.js:116
step @ asyncToGenerator.js:21
(anonymous) @ asyncToGenerator.js:32
Promise.then (async)
step @ asyncToGenerator.js:31
(anonymous) @ asyncToGenerator.js:34
Promise.then (async)
step @ asyncToGenerator.js:31
(anonymous) @ asyncToGenerator.js:39
F @ _export.js:43
(anonymous) @ asyncToGenerator.js:18
(anonymous) @ retry.js:81
_callee2$ @ Utterance.js:201
tryCatch @ runtime.js:63
invoke @ runtime.js:290
prototype.(anonymous function) @ runtime.js:116
step @ asyncToGenerator.js:21
(anonymous) @ asyncToGenerator.js:39
F @ _export.js:43
(anonymous) @ asyncToGenerator.js:18
_speak @ Utterance.js:291
speak @ Utterance.js:133
_next @ Composer.js:178
speak @ Composer.js:161
_callee$ @ SayButton.js:98
tryCatch @ runtime.js:63
invoke @ runtime.js:290
prototype.(anonymous function) @ runtime.js:116
step @ asyncToGenerator.js:21
(anonymous) @ asyncToGenerator.js:39
F @ _export.js:43
(anonymous) @ asyncToGenerator.js:18
callCallback @ react-dom.development.js:17104
commitUpdateEffects @ react-dom.development.js:17144
commitUpdateQueue @ react-dom.development.js:17132
commitLifeCycles @ react-dom.development.js:18147
commitAllLifeCycles @ react-dom.development.js:19674
callCallback @ react-dom.development.js:147
invokeGuardedCallbackDev @ react-dom.development.js:196
invokeGuardedCallback @ react-dom.development.js:250
commitRoot @ react-dom.development.js:19898
(anonymous) @ react-dom.development.js:21446
unstable_runWithPriority @ scheduler.development.js:255
completeRoot @ react-dom.development.js:21445
performWorkOnRoot @ react-dom.development.js:21368
performWork @ react-dom.development.js:21273
performSyncWork @ react-dom.development.js:21247
interactiveUpdates$1 @ react-dom.development.js:21532
interactiveUpdates @ react-dom.development.js:2268
dispatchInteractiveEvent @ react-dom.development.js:5086
Show 43 more frames
fetchSpeechData.js:65 Uncaught (in promise) Error: Failed to syntheis speech, server returned 400
at _callee$ (fetchSpeechData.js:65)
at tryCatch (runtime.js:62)
at Generator.invoke [as _invoke] (runtime.js:288)
at Generator.prototype.(anonymous function) [as next] (http://localhost:3000/static/js/1.chunk.js:1175:21)
at asyncGeneratorStep (asyncToGenerator.js:3)
at _next (asyncToGenerator.js:25)
(Edited by @compulim for code formatting)