Error thrown and uncaught while speaking " " (empty space) on Safari using Cognitive Services #3780
Labels
area-speech
Bot Services
Required for internal Azure reporting. Do not delete. Do not change color.
bug
Indicates an unexpected problem or an unintended behavior.
customer-replied-to
Required for internal reporting. Do not delete.
customer-reported
Required for internal Azure reporting. Do not delete.
p1
Painful if we don't fix, won't block releasing
(Reported internally via Teams on behalf of customer)
Screenshots
Version
Possibly
4.12.0
Describe the bug
When using Cognitive Services to speak on an activity with
speak
field of an empty space" "
,AudioContext.decodeAudioData
will throw an exception, because the TTS-ed wavedata is empty (0 bytes in length, instead of MP3).Thus,
AudioContext.decodeAudioData(ArrayBuffer.from([]))
would throw an exception.This only happens in Safari because Safari is using an older signature of
AudioContext.decodeAudioData
, a.k.a. callback signature.Due to a bug on how we handle the callback signature, we throw an exception of null. It propagate up through here:
Since
error
isnull
, accessingerror.stack
will trigger an exception, which is uncaught.Steps to reproduce
speak
field set to" "
(empty space)Expected behavior
It should not narrate anything.
Additional context
[Bug]
The text was updated successfully, but these errors were encountered: