Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error thrown and uncaught while speaking " " (empty space) on Safari using Cognitive Services #3780

Open
compulim opened this issue Mar 4, 2021 · 2 comments
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

Comments

@compulim
Copy link
Contributor

compulim commented Mar 4, 2021

(Reported internally via Teams on behalf of customer)

Screenshots

image

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.

image

Due to a bug on how we handle the callback signature, we throw an exception of null. It propagate up through here:

image

Since error is null, accessing error.stack will trigger an exception, which is uncaught.

Steps to reproduce

  1. On Safari, speak to a bot that will result in an activity with speak field set to " " (empty space)

Expected behavior

It should not narrate anything.

Additional context

[Bug]

@compulim compulim added the customer-reported Required for internal Azure reporting. Do not delete. label Mar 4, 2021
@corinagum
Copy link
Contributor

For customers experiencing this problem:
Temporary work around: do not send a speak field with a single space

@corinagum corinagum added area-speech bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Required for internal reporting. Do not delete. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. labels Mar 4, 2021
@corinagum corinagum self-assigned this Mar 10, 2021
@corinagum corinagum added this to the R14 milestone Apr 26, 2021
@compulim
Copy link
Contributor Author

compulim commented May 6, 2021

The is also related to #3782.

@Kaiqb Kaiqb added the p1 Painful if we don't fix, won't block releasing label Jun 16, 2021
@compulim compulim modified the milestones: R14, R15 Jun 16, 2021
@compulim compulim removed this from the R15 milestone Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants