-
Notifications
You must be signed in to change notification settings - Fork 1
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
Numbers/comparison statements not read out on ChromeOS #138
Comments
Thanks @stemilymill! Would you mind checking if there's any console errors? |
@chrisklus Here is all that shows up in console: |
Awesome thanks - one more question, and then it might be best to setup a zoom meeting at some point since I don't have a ChromeOS device. Can you operate the sim with the dev tools open and see if those |
All of those pop up as the sim loads, before I even click into a screen from the home screen |
Got it, thank you |
When meeting with @jessegreenberg, he mentioned that he has a Chromebook that he could take a look with, thanks! |
So I just saw something pretty strange. I was testing https://phet-dev.colorado.edu/html/number-play/1.0.0-dev.45/phet/number-play_all_phet.html?screens=1,2,3 on my chromebook. At first no speech synthesis worked. So then I went to test number-play master and still no speech synthesis worked. Then I went to test published john-travoltage. When I got to the sim I heard lots of numbers from number-play, even though john-travoltage was loaded. Then I started hearing john-travoltage Voicing. After that, all speech synthesis in number play was working as expected in the dev version and in master. I tried restarting the chromebook and chrome to get the problem to happen again, but haven't been able to since. |
I switched tabs to search for how to find my chromebook model. When I returned to the sim, all speech synthesis is broken. I also had another tab with number-play running in the background in this case, and I wonder if this is the reason it isn't working well. |
OK, I found a consistent way to break it.
It will stay broken and it is not clear what gets speech synth to start working again. I tried to use it directly in the dev tools but that didn't work. I tried going to another sim like in #138 (comment) but that didn't work. Spamming the speech button in number-play got it to come back once but not again. Restarting chrome works sometimes but not others. |
I logged these things around the ENGINE_WAKE_INTERVAL of SpeechSynthesisAnnouncer: I am finding that when speech synthesis is broken, |
I was able to produce this in a case outside of a PhET sim: https://codepen.io/matt-west/pen/DpmMgE In that example speech is requested synchronously with the click event on the button. Both I tried adding these to force it to stop the synth before speaking: I was just able to fix it once by calling window.speechSynthesis.cancel() in the dev tools. EDIT: cancel() in the dev tools seems to revitalize it. I am going to try calling that when the browser window becomes active. |
For some reason wrapping the Chromebook "engine wake" workaround with calls to cancelSynth() seems to be getting it working more predictably. this.cancelSynth();
this.getSynth().speak( new SpeechSynthesisUtterance( '' ) );
this.cancelSynth(); EDIT: EDIT: More testing, it isn't working very well/consistently. |
I was able to produce the bug in this basic HTML example <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>TEST PAGE</title>
</head>
<body>
<button id="button">Press me!</button>
</body>
<script>
document.getElementById( 'button' ).addEventListener( 'click', () => {
window.speechSynthesis.speak( new SpeechSynthesisUtterance( 'You just pressed me!' ) );
} );
</script>
</html> EDIT; Changing the script to this, by calling cancel and the speaking behind a timeout of 500 ms does NOT fix it. document.getElementById( 'button' ).addEventListener( 'click', () => {
console.log( 'cancelling' );
window.speechSynthesis.cancel();
console.log( 'speaking' );
window.setTimeout( () => {
window.speechSynthesis.speak( new SpeechSynthesisUtterance( 'You just pressed me!' ) );
}, 500 );
} ); BUT calling |
I am about ready to throw in the towel here. Ill check in with the team to request assistance or see if we should reconsider supporting voicing on Chromebooks. I have identified that this is a Chromebook bug and reproduced the issue in a basic HTML5 example. At the very least we should submit a bug report to google. EDIT: Actually, I had one more thought. We could keep track of the amount of time since we all speechSynthesis.speak() and when we get the |
@jessegreenberg thank you so much for investigating! That is super weird behavior. Let me know I could be helpful at all to pair to continue brainstorming ideas. |
From design meeting: We are okay to publish to the prototype with this issue, and would add a note in the teacher tips. @kathy-phet asked QA to check other published sims with voicing on ChromeOS. @jessegreenberg do you think the thought in your last comment is worth investigating still? |
Yes, sorry I haven't gotten to it yet. Regarding other published sims, I fully expect this to be an issue for them as well since I was able to observe this outside of a PhET sim. |
From what I saw on the Chromebook in the office: |
@jessegreenberg I was testing published JT and GFL:B on Chromebook this morning and voicing was working.
For Number Play: I couldn't get voicing to work until after opening JT/GFL:B in another tab and turning on voicing ad then going back to NP. After clearing history it doesn't work again. GFLBdelay.mov |
Thanks @KatieWoe and @Nancy-Salpepi! This is very helpful to know. |
@jessegreenberg briefed me on this issue today during a11y-team dev meeting, and I had a large number of thoughts about how to pursue this issue. The vast majority of them have already been tried by @jessegreenberg, but I felt like applying a bit more rigor to the potential cross-product of possible solutions may be our best bet in finding a workaround. First off, @jessegreenberg and I thought about the prospect of giving up on supporting Chromebook (as stated in #138 (comment)). I support you @jessegreenberg!! I was also curious if we could just let this bug be, report it to google, and still consider ourselves "supporting chromebook". @jessegreenberg mentioned that this bug really looks like our fault, and so it wouldn't be that good a situation to have it break in the wild. Next, I feel like workaround will need to consist of three separate parts, that all may be related, and may need some cross-product testing to see what works best.
|
OK the behavior seems a bit better after changes in phetsims/utterance-queue#66. Here is what I expect now: When speech fails due to switching tabs or one of the other cases pointed out in #138 (comment), speech will stay broken for ~8 seconds but then start to work again more consistently. |
@Nancy-Salpepi or @stemilymill or @KatieWoe can you please try number-play on ChromeOS again and see if this is any better? |
This does seem better. I had trouble getting voicing when I first opened the sim, but it did seem improved otherwise. |
@jessegreenberg things look much better in NP on master! It still takes a couple of clicks to initiate an utterance, but once it starts, it works well. Switching tabs and leaving it open for a while didn't have a negative affect. |
Awesome, thanks for checking both of you! I am going to add this to the accessibility bugs doc and consider this sufficient for now. |
Chromebook version 97.0.4692.102 (32-bit)
For phetsims/qa#771
When I click the speech button to read out the number or the comparison statement (screen 3), the sound for the button click is played but the number is not read out.
Note: after I noticed this, I updated the OS/browser, and then the number was read out twice. Then when I switched screens it did not work anymore.
ChromeOS.does.not.read.numbers.out.loud.mp4
Troubleshooting information:
!!!!! DO NOT EDIT !!!!!
Name: Number Play
URL: https://phet-dev.colorado.edu/html/number-play/1.0.0-dev.45/phet/number-play_all_phet.html?screens=1,2,3
Version: 1.0.0-dev.45 2022-01-31 11:53:19 UTC
Features missing: applicationcache, csstransforms3d, applicationcache, touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (X11; CrOS aarch64 14324.80.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.102 Safari/537.36
Language: en-US
Window: 1300x629
Pixel Ratio: 1.0499999523162842/1
WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium)
GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 15 uniform: 1024
Texture: size: 8192 imageUnits: 16 (vertex: 16, combined: 96)
Max viewport: 8192x8192
OES_texture_float: true
Dependencies JSON: {}
The text was updated successfully, but these errors were encountered: