nvda
71294e46 - Support pitch change for capitals and rate boost (SAPI5 only) for 32 bit SAPI synths (#19541)

Commit
304 days ago
Support pitch change for capitals and rate boost (SAPI5 only) for 32 bit SAPI synths (#19541) Fixes #19529 ### Summary of the issue: PR #19432 added back support for 32 bit sapi synths via a 32 bit shim. However, in-stream synth parameter changes (E.g. pitch changes for capital letters) was not implemented, and therefore pitch would never change when speaking a capital letter. ### Description of user facing changes: ### Description of developer facing changes: ### Description of development approach: * synthDriverHost: when creating a synth driver and returning it to NVDA, also locally track it as the active synth in the host by setting synthDriverHandler._curSynth. this allows synthDriverhandler.getsynth() to return the synth inside the 32 bit host. Needed to fetch the synth's name for config value lookup via synth commands.** * Support all built-in synth commands (I.e. index, break, langChange, characterMode, pitch, rate, volume and phoneme) on 32 bit synthDrivers proxied to NvDA. This includes correctly expsing the supportedCommands property, and a much better serialization / deserialization in speak, which no longer uses Pickle, but instead json, fully supporting all the synth commands. This lallows pitch changes for capital letters among other things.** * sapi4 synthDriver: when fetching rate, pitch and volume values, ensure that the raw values are clipped to the min and max values before converting to percentage. Sometimes the raw value was outside the min max range and was producing values higher than 100%. * Add missing rateBoost getter / setter on SynthDriver proxy. This allows rateBoost to fully function on 32 bit sapi5. ### Testing strategy: * Switch to sapi4. * Open notepad. * Type `Hh`. (The first h being capitalized). * Use left and right arrows to move to each character, having NVDA speak it. Ensure that the pitch is raised for the capital h and back to normal for the second h. ### Known issues with pull request: None known
Parents
Loading