compulim/web-speech-cognitive-services

Handle network error on synthesis

compulim opened this issue · 0 comments

Today, when network error happened while synthesizing, it will not emit and "error" event.

The correct behavior should be "start" event followed by "error" event.

Network error

Testing against server-based voice.

  • Speak an utterance
  • Expect: receive start event
  • (A few seconds later)
  • Expect: receive error event of type SpeechSynthesisErrorEvent
    • error field set to "synthesis-failed"
    • utterance field set to the `SpeechSynthesisUtterance instance
    • elapsedTime field is set
  • There will be no end event