darbaga / Tolk-rs

Bindings to Tolk, a screen reader abstraction library, in rust
MIT License
1 stars 2 forks source link

Strange behavior when outputing multiple words #6

Open cyrmax opened 2 years ago

cyrmax commented 2 years ago

I have the following code: `use tolk::Tolk; use text_io::read;

fn main() { let t = Tolk::new(); loop { let text: String = read!(); if text == "exit" { println!("exiting program!"); return ; } t.output(text, true); } } `

When i enter something like "Hello! I am testing Tolk with Rust" it produces some chunks of speech like "he... i a.... tes... tol... wi... rust" Looks like entered text is sent to screen reader as single words and every next word interrupts previous speech. Looks like every word is a new message to tolk.

When i set interrupt = false it reads whole text correctly but makes very long pauses between words. Again looks like different messages, not single text.

I am not strong in Rust so instead of making pull request i ask you to fix this problem. It would be wonderful!

ndarilek commented 2 years ago

I'd be more interested in this if you could reproduce it in a context where you aren't entering the text that gets spoken. Between keypresses and incoming speech, my money is on something is interrupting the speech queue and messing up speech. Tolk itself isn't very smart and, AFAIK, just calls whatever speech APIs screen readers expose and expects them to work. If they misbehave or aren't well-defined, then maybe they'd exhibit behaviors like this.

I haven't seen this particular issue in tts-rs, and I'd certainly expect to since I'm sending lots of strings at Tolk just fine through that.

Sorry I can't be more helpful. We can certainly leave this issue open in case someone else experiences it or has a PR.