phetsims / utterance-queue

Alerting library powered by aria-live
MIT License
0 stars 2 forks source link

Incorrect voice used in iOS 15.4 + Safari #74

Closed jessegreenberg closed 1 year ago

jessegreenberg commented 2 years ago

I am seeing this issue again in https://github.com/phetsims/qa/issues/791 with iOS 15.4 + Safari.

Ignore my big hand in this video!

https://user-images.githubusercontent.com/87318828/161594340-933a8919-2314-4573-a18f-8b967802201b.mov

Originally posted by @Nancy-Salpepi in https://github.com/phetsims/friction/issues/268#issuecomment-1087794283

jessegreenberg commented 2 years ago

The original issue in https://github.com/phetsims/friction/issues/268#issuecomment-1087794283 was about the wrong voice after selecting an item in the voice ComboBox. But what is shown in @Nancy-Salpepi's video here is even more broken, it looks like "Fred" always sounds like "Samantha".

jessegreenberg commented 2 years ago

I confirmed this on my iPad Air 2, I have Fred and Samantha and both Voices sound like Samantha.

jessegreenberg commented 2 years ago

I tried to re-install Fred to see if I could repair it but apparently you cannot delete Voices once you install them...https://discussions.apple.com/thread/252817481

I will tether my iPad to my Mac and inspect the voice every time we request speech to see if it looks like "Fred". Ill also try installing another english voice and seeing if it sounds correct.

zepumph commented 1 year ago

@jessegreenberg could you give a status update on this. @emily-phet, is this blocking frictions release?

Nancy-Salpepi commented 1 year ago

Weird that we were looking at this issue at the same time @zepumph. @jessegreenberg I am seeing this while testing ratio and proportion (https://github.com/phetsims/qa/issues/831) with iOS 15.6.1 AND macOS 12.5.1 + safari. Also seen with published versions of JT and GFL:B.

jessegreenberg commented 1 year ago

I have not investigated this yet but should! There may be something in the stack trace or maybe some field on the voice that indicates why it sounds incorrect. But it is unclear and we may not be able to prune the broken voice.

emily-phet commented 1 year ago

Let's couple this investigation with that for https://github.com/phetsims/utterance-queue/issues/75. If the root of the issue for these is something relatively straightforward on our end, let's fix. If it's a hard fix, or unclear if it's something on our end, let's defer.

zepumph commented 1 year ago

Adding myself for investigation.

zepumph commented 1 year ago

It is incredibly easy to reproduce this problem. When I downloaded more voices, no matter what, I only had access to the voice that was initially available. @jessegreenberg and I found that this is a known bug with iOS:

Treat this as the caniuse blog: https://weboutloud.io/bulletin/speech_synthesis_in_safari/ https://stackoverflow.com/a/61347785/3408502 https://talkrapp.com/speechSynthesis.html (paragraph above the list of iOS voices) https://developer.apple.com/forums/thread/106517

Basically it isn't currently supported to change any the voice from the default.

Thus we are in workaround mode.

We tried just only displaying the default voice, so that the combo box would just have a single voice in the list (the one that was already on and wasn't changeable), but that didn't work at all! Even though I had downloaded another.

zepumph commented 1 year ago

QA, please note that there is no longer a voice selector in iOS. Feel free to close.

Nancy-Salpepi commented 1 year ago

noted in QA book. Closing

zepumph commented 1 year ago

While investigating https://github.com/phetsims/utterance-queue/issues/75, @chrisklus and I found that we could reproduce this with MacOS version 12.6 Safari 15.6.1 (latest version).

Furthermore, Chris always had a default of "Alex" (it was first in the list). We found this even when when we changed the system voice to Samantha, cleared caches and refreshed. We also found this even when we removed the line setting any voice to utterances to the system. We aren't sure about how to control this, or if it is even possible.

Are we going to need to hide the voice control for all safari?!?!?!

jessegreenberg commented 1 year ago

I just tested this in Safari 15.4 tech preview and saw this happening there. Then I tested in default safari (15.2 on my machine) and the available voices worked correctly.

jessegreenberg commented 1 year ago

According to https://weboutloud.io/bulletin/speech_synthesis_in_safari/ the inability to change voices is not specific to iOS but is happening at least as early as version 15.4 :(

I am OK removing the control entirely in Safari.

zepumph commented 1 year ago

15.4 is pretty recent. This seems like a regression that is more likely to be fixed than many other bugs we encounter. Furthermore, the bug doesn't effect usability, but is instead just confusing. What if instead we just kept the combo box in for safari, hoping that safari will get's it together in a soon-to-be-released version?

emily-phet commented 1 year ago

Here's my 2 cents...I agree here with @zepumph - Let's just leave the voice options as is across all contexts, document somewhere that this issue exists (we can even include a brief mention of this in supporting materials for teachers), and cross our fingers that Safari improves soon.

zepumph commented 1 year ago

@emily-phet and I spoke about this today and we are in agreement about leaving the buggy selector in place with hopes that Apple fixes the bug.

zepumph commented 1 year ago

Reverted above. I added a note about how it is currently broken. Closing