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.
[Tested only on Windows. Low severity.]
A call to
say
with non-words, such as: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
andlength
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 alength
of 1.Note: I haven't eliminated that this might be a bug in SAPI rather than pyttsx.