I have a BIG problem. I make program when user push button like ‘a’, ‘s’, ‘g’, ‘0-9’ etc. The Program repeats letters with voice command. It is useful for blind person. Problem is when users fast typing. If you typing (fast) “My name is John”, program voice tell you first letter ‘M’ and then ‘N’,‘N’,‘N’…‘N’ It repeat only ‘N’, but if you typing (slow) it is ok. Does anybody know how this resolve?
You can looked code on CodePen: link
Please help me!
I thought at first the problem was the
rate() attribute for the Speech object. However I looked at the documentation here and the rate just defines the speed of sound generation, aka fast or sloooww enunciation. I believe the problem is that you are detecting your key strokes in
draw() directly. Unfortunately I was not able to modify the code pen to test this, something odd with my current network. I suggest you generate a sound only when a key is pressed.
First thank you so much for help, man!
I resolved problem (solution). Now that is OK, but I think the voice is late. I am set rate() on maximum, but that is still slow. It doesn’t work instantly. Why is it happens? Does it problem with framework?.
I am not familiar with this library but based on this it seems that there is a queue and the letters are managed through this queue. You will always face a challenge as some people can type faster than the time it takes to speaks those letters being typed. As a programmer, you need to identify this situation and defined strategies to handle it. Would you put a constraint (you might have to) limiting the speed you can type? Or would you only pronounce the letters if the typing is slower than certain typing speed?
You can always explore in google and see how people are approaching this problem of speech vs. typing speed. Or you could go into literature and find people that are working in these concepts, not only the text to speech but also speech tools designed for the visually impair.