Remove automatic language option from MathCAT speech settings#19888
Remove automatic language option from MathCAT speech settings#19888SaschaCowley wants to merge 2 commits into
Conversation
| mathLang = "en" | ||
| if mathLang not in mathConf["speech"]: | ||
| mathConf["speech"][mathLang] = {"speechStyle": ""} | ||
| return mathLang |
There was a problem hiding this comment.
can you update source\mathPres\MathCAT\speech.py
There was a problem hiding this comment.
convertSSMLTextForNVDA still needs to be updated
| @@ -137,14 +137,6 @@ def getLanguages() -> list[LanguageInfo]: | |||
| languages: list[LanguageInfo] = [] | |||
There was a problem hiding this comment.
can you clean up other function referencing "Auto" e.g. getLanguageToUse getSpeechStyles
There was a problem hiding this comment.
I intentionally didn't to keep this PR as safe as possible. But sure
| """Get the language preference, falling back to English if it is Auto. | ||
|
|
||
| :param mathMl: The MathML string to examine for language. Defaults to an empty string. | ||
| :param _mathMl: The MathML string to examine for language. Not used. Defaults to the empty string. |
| mathLang = "en" | ||
| if mathLang not in mathConf["speech"]: | ||
| mathConf["speech"][mathLang] = {"speechStyle": ""} | ||
| return mathLang |
There was a problem hiding this comment.
convertSSMLTextForNVDA still needs to be updated
|
@SaschaCowley, I have not yet tested but already have some questions:
Note: my GUI, system and TTS are in French and German ("Allemand") is the first item of the math language list, before English ("Anglais"). |
|
Sorry, ignore point 1. in my previous comment: I had not yet seen #19886. |
Closes #19811 I am opening this PR as a follow-up to #19888 at the request of @seanbudd Summary of the issue: The automatic language option for MathCAT speech was confusing and didn't respond as expected to speech voice/synthesizer language changes. (from #19888) Description of user facing changes: Removes the "Automatic" option from MathCAT speech. The default is now English. (from #19888) Description of developer facing changes: None Description of development approach: Removed the _mathMl parameter from getLanguageToUse, the save/set/restore language pattern from convertSSMLTextForNVDA, and the "Auto" fallback in _createConfigForSpeechStyle. Added a config profile upgrade step to migrate language = Auto to en.
Link to issue number:
Closes #19811
Summary of the issue:
The automatic language option for MathCAT speech was confusing and didn't respond as expected to speech voice/synthesizer language changes.
Description of user facing changes:
Removes the "Automatic" option from MathCAT speech. The default is now English.
Description of developer facing changes:
None
Description of development approach:
Removed calls pertaining to retrieving the speech language based on the speech language. Given how close we are to a final release, I have not touched any supporting code.
Set the default for
config.conf["math"]["speech"]["language"]to"en"rather than"Auto".Testing strategy:
Ran from source. Read math.
Changed the MathCAT speech language (to German). Read math and.
Changed language back to English and read math.
Overrode the math language to "Auto", saved the config, restarted NVDA, and read math.
Known issues with pull request:
MathCAT's "Auto" option (which pulls the language from the math tag) is still supported, though it is not surfaced in NVDA's GUI.
Code Review Checklist: