Open feerrenrut opened 3 years ago
* Enforce `SynthDriver.supportedCommands` from speech manager (with reasonable defaults if the driver provides and empty list).
Wouldn't it be better to refuse to use drivers providing an empty list?
Reasonable defaults is probably:
supportedCommands = { IndexCommand, CharacterModeCommand, LangChangeCommand,
I'm not sure about this one - now we're assuming that every engine out there supports more than one language.
The defaults are based on what we currently do.
Wouldn't it be better to refuse to use drivers providing an empty list?
This would break synths unnecessarily. Instead we give them a chance to override the value, if they don't provide a sensible list (empty is not sensible), we use the defaults as before.
now we're assuming that every engine out there supports more than one language.
No, only that the synth driver handles the LangChangeCommand, it doesn't have to pass it on, but it would be better for that synth to override the supported commands to exclude it.
I'd be willing to consider dropping LangChangeCommand from the defaults, but this would be a compat breaking change.
I think this would improve alot the flexibility of NVDA in terms of changing voice or the entire synth in different situations automatically (e.g. different syntethizers for different languages when automatic language change is enabled).
cc: @CyrilleB79
Is your feature request related to a problem? Please describe.
SpeechManager
class is the boundary between internal speech processing and the synthesizer, however it isn't entirely clear which commands may exist on either side of that boundary.supported commands
, however these aren't actually considered anywhere.Describe the solution you'd like
SynthCommands
. Commands likePitchCommand
should inherit from there.SynthDriver.supportedCommands
from speech manager (with reasonable defaults if the driver provides and empty list).Reasonable defaults is probably:
Describe alternatives you've considered
None
Additional context
While working on #12710 the conflated purposes of speech commands became clear.