hryanjones / guess-my-word

A word guessing game, where you only know whether my word is before or after your guess. (An unofficial clone of the game previously available on simbase.org)
https://hryanjones.com/guess-my-word/
MIT License
64 stars 26 forks source link

Words entered using text to speech on iOS duplicate letters #59

Open nk9 opened 2 years ago

nk9 commented 2 years ago

On iOS, you can have the system recognize your voice and generate words using the microphone below the keyboard. When you do this in the text box, the first character or two are duplicated. So if you speak the word "even", the text entered in the box is "eeven" or sometimes "eveven". This makes using text to speech with the site pretty annoying.

hryanjones commented 2 years ago

I don't have an iOS to test with, but I have a guess about the code causing the problem.

Does it do the same thing or work as you expect when you try this version?

http://ec2.hryanjones.com/

nk9 commented 2 years ago

New code works as expected. Thanks for the quick fix!

hryanjones commented 2 years ago

Glad it's working now

fix commit: https://github.com/hryanjones/guess-my-word/commit/fad9132439608155791125dc40a404099ccb4314

nk9 commented 2 years ago

@hryanjones any chance of getting this change deployed? The EC2 link doesn't work anymore (did you mean to keep the instance on?), but the main website still has the problem.

Thanks!

hryanjones commented 2 years ago

It's been pushed to the live site since my comment (the thing that says says "fix commit").

Can I get a screenshot of what this looks like? My current guess is that it may not be something I can control...

nk9 commented 2 years ago

Here's a screen recording of the behavior. I'm on iOS 15.2.1. Unfortunately, the microphone stops recording when sound is sent to the text to speech engine. Hopefully you can still see what's going on though.

First of all, it's not entering most of the text until the recording session is complete. And secondly, there's that initial letter or syllable that's duplicated. Notice in the Google account form, how the word changes as more syllables are spoken. I wonder if that behavior is the problem?

I'm really confused how the issue went away and then came back. 🤷‍♂️

https://user-images.githubusercontent.com/3646730/154715425-11bb724a-c0eb-4a0e-be55-1b3440d55203.MOV