phetsims / number-compare

"Number Compare" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 0 forks source link

On Chromebook, it sometimes takes two actions before a statement is heard #32

Closed Nancy-Salpepi closed 1 year ago

Nancy-Salpepi commented 1 year ago

Test device Chromebook

Operating System ChromeOS 110.0.5481.181

Problem description For https://github.com/phetsims/qa/issues/917, with 'Hear Number Sentence' on, after selecting a locale that has only eSpeak voices, it usually takes 2 actions before I hear anything.

Steps to reproduce Here is one example:

  1. In the Audio Tab, turn on 'Hear Number Sentence' --compare sentence is heard in English
  2. In the localization tab, select a locale that has eSpeak voices (ex. italiano on my device). DO NOT press the voice.
  3. Exit the dialog
  4. Place an item in the left play area --nothing is heard
  5. Place a second item in the left play area --compare statement is heard
Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Number Compare‬ URL: https://phet-dev.colorado.edu/html/number-compare/1.0.0-dev.6/phet/number-compare_all_phet.html Version: 1.0.0-dev.6 2023-03-15 01:30:22 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15 Language: en-US Window: 1203x654 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.0) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
zepumph commented 1 year ago

I asked @jessegreenberg to kindly do a bit of reproducing because he has a chromebook. He'll report back to see if pairing is the next step.

jessegreenberg commented 1 year ago

I am able to reproduce this pretty consistently. One way for me to reproduce is to switch between English and Bengali (eSpeak Bengali) and then just press the yellow speaker button. It happens ever time I switch, even without reload.

EDIT: It happens ~70% of the time, not always.

jessegreenberg commented 1 year ago

I think this is an extension of https://github.com/phetsims/gravity-force-lab-basics/issues/303 (Chromebook puts speech to sleep if not used and then takes a while to re-initialize again). I have the same problem if I do the following:

If the "sleep" optimization Chromebooks use is specific to the Voice, maybe we can "wake" it by providing the selected Voice in the workaround utterance here. https://github.com/phetsims/utterance-queue/blob/36fdea460883369af36712e1aefef89bf2e25e0d/js/SpeechSynthesisAnnouncer.ts#L474-L489

EDIT: After 20 minutes of testing, I can no longer reproduce this.

EDIT2: It IS reprodicible in 1.0.0-dev.6 but NOT in master. Either something changed or Chromebooks behave differently with localhost.

EDIT3: In case it was about the URL or build, I made https://bayes.colorado.edu/dev/html/jg-tests/number-compare/number-compare_all_phet_debug.html off of master. I cannot reproduce the problem in that build.

jessegreenberg commented 1 year ago

@zepumph @chrisklus I can reproduce it in 1.0.0-dev.6 but it seems fixed in master. See above notes. I am not sure what else to do. Can you think of any changes to sim or utterance-queue since dev.6 that could have fixed this or changed the behavior?

I noticed in master you now hear speech when pressing the language in the vertical carousel, but I don't know why that would change things.

chrisklus commented 1 year ago

Thank you so much for this @jessegreenberg! I was initially wondering if this was related to switching from two announcers to one etc, but it looks like that change was finished just before dev.6 was created. There have been a number of changes related to speech synthesis since then, see https://github.com/phetsims/number-suite-common/issues/56 and the many issues tagged in that issue, so @zepumph and I are not sure what the fix was.

We recommend to mark this is as ready for review and have it verified in the next dev version. @Nancy-Salpepi could you please wait for now but confirm this in the next Number Play/Number Compare dev test? I'll be sure to link it in issues to verify, thanks! Feel free to close if still looking good at that point. And thank you again @jessegreenberg!

Nancy-Salpepi commented 1 year ago

This looks good in Number Play 1.1.0-dev10. @chrisklus shall we keep this open until confirmed in a Number Compare dev/rc as well?

zepumph commented 1 year ago

This version was published today, can you just use that one? Feel free to close if all is well

https://phet-dev.colorado.edu/html/number-compare/1.0.0-dev.7/phet/number-compare_all_phet.html

Nancy-Salpepi commented 1 year ago

Sounds good in Number Compare as well. Closing!