diff --git a/core/core-agnostic.py b/core/core-agnostic.py index 87c3fa2..42a694b 100644 --- a/core/core-agnostic.py +++ b/core/core-agnostic.py @@ -12,8 +12,8 @@ # We want to get the settings from the talon file but then update # them locally here so we can change them globally via expose talon actions def initialize_settings(): - ctx.settings["user.echo_dictation"]: bool = settings.get("user.echo_dictation") - ctx.settings["user.echo_context"]: bool = settings.get("user.echo_context") + ctx.settings["user.echo_dictation"]: bool = settings.get("user.echo_dictation", True) + ctx.settings["user.echo_context"]: bool = settings.get("user.echo_context", False) # initialize the settings only after the user settings have been loaded app.register('ready', initialize_settings) @@ -94,6 +94,7 @@ def toggle_echo_all(): def tts(text: str): '''text to speech with robot voice''' + print("Sight-Free-Talon Error: TTS not implemented in this context") def espeak(text: str): '''text to speech with espeak''' diff --git a/docs/src/ATTRIBUTIONS.md b/docs/src/ATTRIBUTIONS.md index 1420835..3616562 100644 --- a/docs/src/ATTRIBUTIONS.md +++ b/docs/src/ATTRIBUTIONS.md @@ -10,8 +10,7 @@ - [https://github.com/aPinix/indent-jump-vscode](https://github.com/aPinix/indent-jump-vscode) - [https://www.techrxiv.org/articles/preprint/Image_Captioning_for_the_Visually_Impaired_and_Blind_A_Recipe_for_Low-Resource_Languages/22133894](https://www.techrxiv.org/articles/preprint/Image_Captioning_for_the_Visually_Impaired_and_Blind_A_Recipe_for_Low-Resource_Languages/22133894) - [https://www.theverge.com/23203911/screen-readers-history-blind-henter-curran-teh-nvda](https://www.theverge.com/23203911/screen-readers-history-blind-henter-curran-teh-nvda) -- [https://www.freedomscientific.com/SurfsUp/Speech_Sounds_Schemes.htm] -- (https://www.freedomscientific.com/SurfsUp/Speech_Sounds_Schemes.htm) +- [https://www.freedomscientific.com/SurfsUp/Speech_Sounds_Schemes.htm](https://www.freedomscientific.com/SurfsUp/Speech_Sounds_Schemes.htm) ## Emacspeak @@ -19,6 +18,8 @@ - [https://emacspeak.blogspot.com/](https://emacspeak.blogspot.com/) - [https://www.emacswiki.org/emacs/BrailleMode](https://www.emacswiki.org/emacs/BrailleMode) - [https://www.emacswiki.org/emacs/EmacSpeak](https://www.emacswiki.org/emacs/EmacSpeak) +- [https://emacspeak.sourceforge.net/tips.html](https://emacspeak.sourceforge.net/tips.html) +- [https://tvraman.github.io/emacspeak/manual/TTS-Servers.html](https://tvraman.github.io/emacspeak/manual/TTS-Servers.html) ## NVDA @@ -26,9 +27,14 @@ - Documentation for this controller client can be found at [https://github.com/nvaccess/nvda/blob/master/extras/controllerClient/readme.md](https://github.com/nvaccess/nvda/blob/master/extras/controllerClient/readme.md) - [https://github.com/nvaccess/nvda/wiki/](https://github.com/nvaccess/nvda/wiki/) - [ https://addons.nvda-project.org/addons/AudioThemes.en.html](https://addons.nvda-project.org/addons/AudioThemes.en.html) -- [https://addons.nvda-project.org/addons/phoneticPunctuation.en.html] (https://addons.nvda-project.org/addons/phoneticPunctuation.en.html) +- [https://addons.nvda-project.org/addons/phoneticPunctuation.en.html](https://addons.nvda-project.org/addons/phoneticPunctuation.en.html) - Helpful settings - Document Formatting: "Line Indentation Reporting" set to "Tones" + - Scratchpad located within the NVDA advanced settings, there you can import python scripts during development + +## JAWS + +- [https://www.freelists.org/post/jawsscripts/FW-FSAPIdll](https://www.freelists.org/post/jawsscripts/FW-FSAPIdll) ## Libraries @@ -41,3 +47,4 @@ - [https://github.com/actions/runner-images/issues/4770](https://github.com/actions/runner-images/issues/4770) - [https://github.com/AccessLint/screenreaders/tree/main/packages/voiceover](https://github.com/AccessLint/screenreaders/tree/main/packages/voiceover) +- [https://support.apple.com/en-gb/guide/voiceover/cpvougen/mac](https://support.apple.com/en-gb/guide/voiceover/cpvougen/mac) diff --git a/nvda/.addOn/changeInterrupt.py b/nvda/.addOn/changeInterrupt.py new file mode 100644 index 0000000..c0ecae1 --- /dev/null +++ b/nvda/.addOn/changeInterrupt.py @@ -0,0 +1,11 @@ +import globalPluginHandler +from scriptHandler import script +import config + +class GlobalPlugin(globalPluginHandler.GlobalPlugin): + + @script(gesture="kb:NVDA+9") + def script_announceNVDAVersion(self, gesture): + interrupt = config.conf["keyboard"]["speechInterruptForCharacters"] + config.conf["keyboard"]["speechInterruptForCharacters"] = not interrupt + \ No newline at end of file diff --git a/nvda/.addOn/global.py b/nvda/.addOn/global.py index e8b619c..91aac39 100644 --- a/nvda/.addOn/global.py +++ b/nvda/.addOn/global.py @@ -50,4 +50,6 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin): @script(gesture="kb:NVDA+shift+v") def script_announceNVDAVersion(self, gesture): - ui.message(versionInfo.version) \ No newline at end of file + ui.message(versionInfo.version) + + diff --git a/nvda/nvda.py b/nvda/nvda.py index f523cce..887422b 100644 --- a/nvda/nvda.py +++ b/nvda/nvda.py @@ -41,7 +41,16 @@ def toggle_nvda(): actions.user.tts("Turning NVDA off") time.sleep(1) actions.key("enter") - + + def restart_nvda(): + """Restarts NVDA""" + if actions.user.is_nvda_running(): + actions.user.with_nvda_mod_press('q') + time.sleep(0.5) + actions.key("down") + time.sleep(0.5) + actions.key("enter") + actions.user.tts("Restarting NVDA") def with_nvda_mod_press(key: str): @@ -117,4 +126,3 @@ def braille(text: str): # speech_system.register("pre:phrase", toggle_speak_typed_words) # speech_system.register("post:phrase", toggle_speak_typed_words) - diff --git a/nvda/nvda.talon b/nvda/nvda.talon index 1c82267..24eca2a 100644 --- a/nvda/nvda.talon +++ b/nvda/nvda.talon @@ -143,3 +143,5 @@ braille display dialog: pass through next: user.with_nvda_mod_press('f2') +restart reader: + user.restart_nvda() \ No newline at end of file diff --git a/pedal/.nvda-pedal.talon b/pedal/.nvda-pedal.talon new file mode 100644 index 0000000..789d72c --- /dev/null +++ b/pedal/.nvda-pedal.talon @@ -0,0 +1,8 @@ +# tag: user.nvda_running + +# - + +# # navigate through links on a page +# deck(pedal_left:repeat): +# key(tab) +# sleep(.2) diff --git a/pedal/.slack-pedal.talon b/pedal/.slack-pedal.talon new file mode 100644 index 0000000..3e6a768 --- /dev/null +++ b/pedal/.slack-pedal.talon @@ -0,0 +1,9 @@ +# title: /app.slack.com/ + +# - + +# deck(pedal_left): +# key(tab:down) +# key(f6) +# key(tab:up) +# sleep(0.1) diff --git a/pedal/nvda-pedal.talon b/pedal/nvda-pedal.talon deleted file mode 100644 index 3ae33c2..0000000 --- a/pedal/nvda-pedal.talon +++ /dev/null @@ -1,9 +0,0 @@ -tag: user.nvda_running - -- - -# navigate through links on a page -deck(pedal_left:repeat): - key(tab) - sleep(.2) - diff --git a/pedal/slack-pedal.talon b/pedal/slack-pedal.talon deleted file mode 100644 index 797ef49..0000000 --- a/pedal/slack-pedal.talon +++ /dev/null @@ -1,10 +0,0 @@ -title: /app.slack.com/ - -- - -deck(pedal_left): - key(tab:down) - key(f6) - key(tab:up) - sleep(0.1) - diff --git a/sight-free-global.talon b/sight-free-global.talon index 710d314..3cad068 100644 --- a/sight-free-global.talon +++ b/sight-free-global.talon @@ -42,5 +42,5 @@ toggle [screen] reader: toggle (key | keypress) sound: user.toggle_keypress_sound() -swtich voice: +(swtich | change) voice: user.switch_voice() diff --git a/utils/utils.py b/utils/utils.py index e659d25..168408c 100644 --- a/utils/utils.py +++ b/utils/utils.py @@ -93,9 +93,6 @@ def explore_settings(): builder.p(f"{setting}, {active_settings[setting]}") builder.render() - def explore_modes(): - """Open the talon modes file""" - def extract_text(): """Extract the text from the current window""" diff --git a/voiceover/tmp.applescript b/voiceover/tmp.applescript new file mode 100644 index 0000000..d3e2798 --- /dev/null +++ b/voiceover/tmp.applescript @@ -0,0 +1,30 @@ +-------------------- +set currentDate to current date +say currentDate using "Ava" +delay 2 + +----------------------- +try + set doNotShowSplashScreen to (do shell script "defaults read com.apple.VoiceOverTraining doNotShowSplashScreen") as integer as boolean +on error + set doNotShowSplashScreen to false +end try +if doNotShowSplashScreen then + do shell script "/System/Library/CoreServices/VoiceOver.app/Contents/MacOS/VoiceOverStarter" +else + do shell script "defaults write com.apple.VoiceOverTraining doNotShowSplashScreen -bool true && /System/Library/CoreServices/VoiceOver.app/Contents/MacOS/VoiceOverStarter" +end if + + +--- allow voiceover to be controlled with applescript +tell application "VoiceOver" to say (do shell script "date +\"%l:%M %p\"") using "Karen" speaking rate 270 volume 0.4 + + +-- Set the text you want VoiceOver to speak---------------- +set textToSpeak to "Hello, this is a test." +do shell script "say " & quoted form of textToSpeak + +---------------- +tell application "VoiceOver" + tell commander to perform command item chooser +end tell