nvda
b4ef16f1 - Only strip from right of string when processing for symbol pronunciation and normalization is enabled (#16786)

Commit
1 year ago
Only strip from right of string when processing for symbol pronunciation and normalization is enabled (#16786) Fixes #16772 Summary of the issue: When reporting of normalized characters is enabled and OneCore is used, it does not pronounce the space that should be part of the speech sequence, so it announces Cnormalized rather than c normalized Description of user facing changes Normalized characters are pronounced correctly, e.g. as C normalized Description of development approach OneCore uses spelling functionality, which adds the character mode command to the speech sequence. This results in a sequence like [CharacterModeCommand(True), "C", CharacterModeCommand(False), " normalized"]. Every distinct string in the sequence is passed through ProcessText, which strips spacing from the left and right of the string. This effectively results in a string of Cnormalized passed to the synthesizer. Therefore, I changed processText to only strip from the right of the string when normalization is enabled. Note that this bug is not related to the normalization code as such, the normalization work just uncovers an existing bug, which is now only fixed in the case of normalization.
Author
Parents
Loading