phetsims / utterance-queue

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

Add a way to request content immediately #18

Closed jessegreenberg closed 2 years ago

jessegreenberg commented 3 years ago

For Voicing, we need to be able to request speech immediately without the use of the UtteranceQueue. This was added to webSpeaker with a function called speakImmediately that makes a direct call to the speech synth rather than added to the UtteranceQueue. In review for https://github.com/phetsims/scenery/issues/1223 @zepumph suggested

// Instead of this function on the announcer, I'd rather build this functionality into the UtteranceQueue. Like a synchronous bypass around previously queued items. https://github.com/phetsims/scenery/issues/1223

zepumph commented 3 years ago

I believe that will be what what we need, but I didn't really look at exact usages. Can you please review the above commit, and use it in exchange for voicingManager.speakImmediately() if that feels right, otherwise let's discuss further!

zepumph commented 2 years ago

@jessegreenberg and I co-reviewed this, and we created https://github.com/phetsims/scenery/issues/1269. Closing