Please sign in to comment.
Speech commands use sequences rather than strings (PR #10371)
In order to get many of the benefits of the speech refactor, we need to have speech sequences (rather than single strings) returned from our various getXSpeech methods. This will be necessary if we want to use sounds instead of text to indicate spelling errors, change voice parameters for emphasized text or links, etc. * Definitions and all usages converted: - getControlFieldSpeech - speech.getControlFieldSpeech - browseMode.BrowseModeDocumentTextInfo.getControlFieldSpeech - textInfos.TextInfo.getControlFieldSpeech - speech.getFormatFieldSpeech - getFormatFieldSpeech - appModules.kindle.BookPageViewTextInfo.getFormatFieldSpeech - textInfos.TextInfo.getFormatFieldSpeech - treeInterceptorHandler.RootProxyTextInfo.getFormatFieldSpeech - speech.getSpeechTextForProperties - speech.getIndentationSpeech - speech.getTableInfoSpeech * Rename getSpeechTextForProperties to getPropertiesSpeech * Unify line endings (use Windows line endings) in excel.py * Add speechSequence checking - Logs errors in speech sequences (unknown types, None entries, empty list entries) - Must be enabled in the advanced panel, logging options. * Remove separator argument from getFormatFieldSpeech method * Include padding added to strings for speech in test - In the future it would be better to test speech as structured data. This would allow us to test commands as well. * Fix unnecessary newlines between speech items in Speech viewer - SpeechViewer.appendText renamed to appendSpeechSequence. - appendSpeechSequence takes a SpeechSequence instead of a str. - This allows more control over the presentation of speech, which will separate speech items with a space, and conclude with a newline. Fixes #10098
- Loading branch information...
Showing with 724 additions and 289 deletions.
- +44 −37 source/NVDAObjects/window/excel.py
- +39 −13 source/appModules/kindle.py
- +5 −4 source/aria.py
- +2 −0 source/browseMode.py
- +1 −0 source/config/configSpec.py
- +14 −12 source/controlTypes.py
- +17 −9 source/globalCommands.py
- +1 −0 source/gui/settingsDialogs.py
- +8 −4 source/mathPres/__init__.py
- +443 −168 source/speech/__init__.py
- +4 −4 source/speech/commands.py
- +41 −0 source/speech/types.py
- +22 −7 source/speechViewer.py
- +45 −12 source/textInfos/__init__.py
- +23 −7 source/treeInterceptorHandler.py
- +3 −3 tests/system/NVDA Core/startupShutdownNVDA.robot
- +4 −4 tests/system/NVDA Core/variables.py
- +1 −1 tests/system/libraries/nvdaRobotLib.py
- +7 −4 tests/system/libraries/systemTestSpy.py
Oops, something went wrong.