RapidWareTech / pyttsx

Cross-platform text-to-speech wrapper
Other
370 stars 134 forks source link

Callback gets confused over word-boundaries. #27

Open Julian-O opened 10 years ago

Julian-O commented 10 years ago

[Tested only on Windows. Low severity.]

A call to say with non-words, such as:

say('/////')
say('/?.!@")

will, quite reasonably, result in the engine pronouncing each of the punctuation characters separately rather than as a word.

For each of the punctuation characters, the started-word callback is called - again this is reasonable.

However, the location and length parameters do not indicate the individual character being pronounced, but the whole non-word.

That is, the callback is called repeatedly, once for every letter, with exactly the same parameters.

I would expect either: the callback is only made once, for the whole non-word, or that the callback is made for each character, with a location than increments by one each time, and a length of 1.

Note: I haven't eliminated that this might be a bug in SAPI rather than pyttsx.