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

Sound fluctuates after turning off Voicing on iPad #423

Closed
Nancy-Salpepi opened this issue Mar 29, 2023 · 9 comments
Closed

Sound fluctuates after turning off Voicing on iPad #423

Nancy-Salpepi opened this issue Mar 29, 2023 · 9 comments
Assignees
Labels
dev:sound type:bug Something isn't working

Comments

@Nancy-Salpepi
Copy link

Test device
iPad 9th generation

Operating System
iOS 16.3.1

Browser
safari

Problem description
For phetsims/qa#923, after turning off Voicing the Shape Sounds will fade in and out.

Steps to reproduce

  1. Move a side/corner to begin sound
  2. Before sound fades, turn on Play Shape Sounds Forever
  3. Turn on Voicing
  4. Turn off Voicing and exit Preferences

Visuals
Here is what is sounds like after the steps above:

SoundFlux.mov
Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Quadrilateral‬ URL: https://phet-dev.colorado.edu/html/quadrilateral/1.0.0-dev.76/phet/quadrilateral_all_phet.html Version: 1.0.0-dev.76 2023-03-28 17:13:45 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: 1342x705 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: {}
@Nancy-Salpepi
Copy link
Author

It also fluctuates when Voicing is on and nothing is being read.

@jessegreenberg
Copy link
Contributor

Thanks @Nancy-Salpepi - Just in case, I tried on Win 10 Chrome but did not see it there so Ill try on iOS. This is probably a common code problem with audio ducking + speech synthesis (phetsims/tambo#167)

@jessegreenberg
Copy link
Contributor

I am able to reproduce this with iOS 15.0.2 Safari. I could not reproduce this in macOS 11.7.2 Safari.

@jessegreenberg
Copy link
Contributor

jessegreenberg commented Mar 29, 2023

@jessegreenberg
Copy link
Contributor

I found it. It is caused by this workaround that was added for Chromebooks: https://github.com/phetsims/utterance-queue/blob/36fdea460883369af36712e1aefef89bf2e25e0d/js/SpeechSynthesisAnnouncer.ts#L472-L483

What must be happening is that iOS has built-in audio ducking for speech synthesis. That is why removing PhET's audio ducking didn't change the behavior. The empty string in that workaround still triggers the ducking even though there is no speech.

I am guessing this was also introduced when the workaround string became an empty space for phetsims/friction#328.

@jessegreenberg
Copy link
Contributor

I just noticed that this is a problem for all iOS browsers, not just Safari. So if we opt out of that workaround we need it to be for all iOS which we don't currently have a check for in platform.js.

@jessegreenberg
Copy link
Contributor

A fix has been proposed in phetsims/utterance-queue#110. @Nancy-Salpepi can you please test again and confirm this is fixed?

@Nancy-Salpepi
Copy link
Author

The sound sounds fixed in master. haha 🙃

@jessegreenberg
Copy link
Contributor

Excellent, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev:sound type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants