-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 1.2.0 added multiple sound packages added new keyboard shortcuts added a settings page added a arabic language update the redmi file Contributed by mesteranas This is the version I intend to publish it on nvde addon store for the first time.
- Loading branch information
1 parent
2b173ff
commit 07d2789
Showing
113 changed files
with
248 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,48 @@ | ||
# navsounds | ||
|
||
# nav Sounds | ||
This is an NVDA screen reader add-on that provides navigation sounds based on different roles when interacting with the screen reader. | ||
|
||
## About | ||
|
||
|
||
This add-on is inspired by the abandoned "objsounds" add-on created by Tyler Spivey. Since that add-on hasn't been updated for a long time, I decided to create this add-on to continue providing similar functionality while keeping up with the changes in the NVDA screen reader. | ||
|
||
|
||
## Features | ||
|
||
- Provides navigation sounds based on different roles. | ||
- Toggle the navigation sounds on and off using a keyboard gesture. | ||
- Designed to work with NVDA version 2019.3 and later. | ||
- Toggle Functionality: Easily switch between enabling and disabling object sounds and toggling object type reading with a simple keyboard gesture. | ||
- Customization: Access a settings page where you can choose from various navigation sound packages and configure additional options. | ||
- Expandable: includes a selection of sound packages, and you can even create and add your custom packages. | ||
|
||
- Compmpatibility: Designed to seamlessly work with modern NVDA versions, starting from 2019.3 and later. | ||
|
||
|
||
## Installation | ||
For NVDA Installed Versions: | ||
1. Download the latest release from the [Releases](https://github.com/ahmedthebest31/navsounds/releases/) section. | ||
2. Double-click the downloaded add-on file and confirm the installation by clicking "OK." | ||
3. NVDA will automatically restart, and you're ready to use NavigationSounds. | ||
|
||
|
||
1. Download the latest release from the [Releases ](https://github.com/ahmedthebest31/navsounds/releases) section. | ||
2. Open the NVDA screen reader. | ||
3. Navigate to the NVDA menu -> Tools -> Manage add-ons. | ||
For NVDA Portable Installation: | ||
|
||
1. Download the latest release from the [Releases](https://github.com/ahmedthebest31/navsounds/releases) section. | ||
2. Open your NVDA screen reader. | ||
3. Navigate to the NVDA menu: Tools -> Manage add-ons. | ||
4. Click the "Install" button and select the downloaded add-on file. | ||
5. Restart NVDA. | ||
5. Restart NVDA to activate NavigationSounds. | ||
|
||
|
||
## Usage | ||
|
||
- The navigation sounds will play based on the roles of objects as you interact with NVDA. | ||
- To toggle the navigation sounds on or off, use the keyboard gesture: NVDA+Shift+Delete. | ||
- use the keybord shortcut (NVDA+alt+n) Pressing it once toggles between on and off object sounds, and Pressing twice it toggles between reading and disabling object types | ||
- You can customize the keyboard shortcut as you prefer | ||
open nvda menue Preferences subMenu / Input gestures | ||
navigation sounds | ||
|
||
## Contributing | ||
|
||
Contributions to this project are welcome! If you find a bug, have an idea for an improvement, or want to contribute in any other way, please feel free to open an issue or submit a pull request. | ||
|
||
Special thanks to [mesteranas](https://github.com/mesteranas/) for his wonderful Contributions in developing this add-on with me. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# -*- coding: UTF-8 -*- | ||
import globalPluginHandler | ||
from winsound import PlaySound | ||
import controlTypes, ui, os, speech, NVDAObjects | ||
import config | ||
from scriptHandler import script, getLastScriptRepeatCount | ||
from gui import SettingsPanel, NVDASettingsDialog, guiHelper | ||
import addonHandler | ||
addonHandler.initTranslation() | ||
import wx | ||
|
||
|
||
roleSECTION = "NavigationSounds" | ||
confspec = { | ||
"sayRoles": "boolean(default=false)", | ||
"soundType": "string(default=sound1)", | ||
"rolesSounds": "boolean(default=true)"} | ||
config.conf.spec[roleSECTION] = confspec | ||
rolesSounds= config.conf[roleSECTION]["rolesSounds"] | ||
sayRoles= config.conf[roleSECTION]["sayRoles"] | ||
def loc(): | ||
return os.path.join(os.path.abspath(os.path.dirname(__file__)), "effects",config.conf[roleSECTION]["soundType"]) | ||
#Add all the roles, looking for name.wav. | ||
def sounds(): | ||
sounds1 = {} | ||
for role in [x for x in dir(controlTypes) if x.startswith('ROLE_')]: | ||
r = os.path.join(loc(), role[5:].lower()+".wav") | ||
sounds1[getattr(controlTypes, role)] = r | ||
return sounds1 | ||
|
||
def getSpeechTextForProperties2(reason=NVDAObjects.controlTypes.OutputReason, *args, **kwargs): | ||
role = kwargs.get('role', None) | ||
if 'role' in kwargs and role in sounds() and os.path.exists(sounds()[role]) and sayRoles ==False: | ||
del kwargs['role'] | ||
return old(reason, *args, **kwargs) | ||
|
||
def play(role): | ||
"""plays sound for role.""" | ||
f = sounds()[role] | ||
if os.path.exists(f) and rolesSounds==True: | ||
PlaySound(f, 1) | ||
|
||
class GlobalPlugin(globalPluginHandler.GlobalPlugin): | ||
scriptCategory= _("navigation sounds") | ||
def __init__(self, *args, **kwargs): | ||
globalPluginHandler.GlobalPlugin.__init__(self, *args, **kwargs) | ||
NVDASettingsDialog.categoryClasses.append(NavSettingsPanel) | ||
global old | ||
old = speech.speech.getPropertiesSpeech | ||
|
||
def event_gainFocus(self, obj, nextHandler): | ||
if rolesSounds == True: | ||
speech.speech.getPropertiesSpeech = getSpeechTextForProperties2 | ||
play(obj.role) | ||
nextHandler() | ||
|
||
@script(gesture="kb:NVDA+alt+n") | ||
def script_toggle(self, gesture): | ||
global rolesSounds, sayRoles | ||
isSameScript = getLastScriptRepeatCount() | ||
if isSameScript == 0: | ||
rolesSounds = not rolesSounds | ||
if rolesSounds==False: | ||
ui.message(_("Disable navigation sounds")) | ||
else: | ||
ui.message(_("Enable navigation sounds")) | ||
elif isSameScript ==1: | ||
sayRoles = not sayRoles | ||
if sayRoles ==False: | ||
ui.message(_("Disable sayRoles")) | ||
else: | ||
ui.message(_("Enable sayRoles")) | ||
config.conf[roleSECTION]["sayRoles"] = sayRoles | ||
config.conf[roleSECTION]["rolesSounds"] = rolesSounds | ||
script_toggle.__doc__= _("Pressing it once toggles between on and off object sounds, and Pressing twice it toggles between reading and disabling object types.") | ||
def terminate(self): | ||
NVDASettingsDialog.categoryClasses.remove(NavSettingsPanel) | ||
|
||
class NavSettingsPanel(SettingsPanel): | ||
title = _("navigation sounds") | ||
def makeSettings(self, settingsSizer): | ||
sHelper = guiHelper.BoxSizerHelper(self, sizer=settingsSizer) | ||
self.tlable = sHelper.addItem(wx.StaticText(self, label=_("select sound"), name="ts")) | ||
self.sou= sHelper.addItem(wx.Choice(self, name="ts")) | ||
self.sou.Set(os.listdir(os.path.join(os.path.abspath(os.path.dirname(__file__)), "effects"))) | ||
self.sou.SetStringSelection(config.conf[roleSECTION]["soundType"]) | ||
self.nas=sHelper.addItem(wx.CheckBox(self,label=_("say roles"))) | ||
self.nas.SetValue(config.conf[roleSECTION]["sayRoles"]) | ||
self.nab=sHelper.addItem(wx.CheckBox(self,label=_("navigation sounds"))) | ||
self.nab.SetValue(config.conf[roleSECTION]["rolesSounds"]) | ||
def postInit(self): | ||
self.sou.SetFocus() | ||
def onSave(self): | ||
global sayRoles,rolesSounds | ||
config.conf[roleSECTION]["soundType"]=self.sou.GetStringSelection() | ||
config.conf[roleSECTION]["sayRoles"]=self.nas.GetValue() | ||
sayRoles=config.conf[roleSECTION]["sayRoles"] | ||
config.conf[roleSECTION]["rolesSounds"]=self.nab.GetValue() | ||
rolesSounds=config.conf[roleSECTION]["rolesSounds"] |
Binary file added
BIN
+4.63 KB
navsounds/globalPlugins/NavigationSounds/__pycache__/__init__.cpython-37.opt-1.pyc
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added
BIN
+58.5 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/CHECKMENUITEM.wav
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+4.37 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/DROPDOWNBUTTONGRID.wav
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+17.2 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/MENUBUTTON.wav
Binary file not shown.
Binary file added
BIN
+7.08 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/RADIOMENUITEM.wav
Binary file not shown.
Binary file added
BIN
+15.1 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/SPINBUTTON.wav
Binary file not shown.
Binary file added
BIN
+17.2 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/STATICTEXT.wav
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+29.8 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/dropdownbutton.wav
Binary file not shown.
Binary file added
BIN
+25.4 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/editabletext.wav
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+83.7 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/passwordedit.wav
Binary file not shown.
Binary file added
BIN
+13.8 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/popupmenu.wav
Binary file not shown.
Binary file added
BIN
+40.1 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/radiobutton.wav
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+31.1 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/splitbutton.wav
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+87 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/togglebutton.wav
Binary file not shown.
Binary file added
BIN
+27.1 KB
navsounds/globalPlugins/NavigationSounds/effects/sound2/treeviewitem.wav
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+3.41 KB
navsounds/globalPlugins/NavigationSounds/effects/voice over/button.wav
Binary file not shown.
Binary file added
BIN
+17.9 KB
navsounds/globalPlugins/NavigationSounds/effects/voice over/checkbox.wav
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+79.4 KB
navsounds/globalPlugins/NavigationSounds/effects/voice over/combobox.wav
Binary file not shown.
Binary file added
BIN
+30.3 KB
navsounds/globalPlugins/NavigationSounds/effects/voice over/editabletext.wav
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+31 KB
navsounds/globalPlugins/NavigationSounds/effects/voice over/listitem.wav
Binary file not shown.
Binary file added
BIN
+3.41 KB
navsounds/globalPlugins/NavigationSounds/effects/voice over/menuitem.wav
Binary file not shown.
Binary file added
BIN
+17.9 KB
navsounds/globalPlugins/NavigationSounds/effects/voice over/radiobutton.wav
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+31.1 KB
navsounds/globalPlugins/NavigationSounds/effects/voice over/splitbutton.wav
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+13.6 KB
navsounds/globalPlugins/NavigationSounds/effects/voice over/treeviewitem.wav
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) YEAR ORGANIZATION | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"POT-Creation-Date: 2023-09-02 13:56+0300\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <LL@li.org>\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=cp1252\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Generated-By: pygettext.py 1.5\n" | ||
|
||
|
||
#: | ||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:49 | ||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:85 | ||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:94 | ||
msgid "navigation sounds" | ||
msgstr "" | ||
|
||
#: | ||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:69 | ||
msgid "Disable navigation sounds" | ||
msgstr "" | ||
|
||
#: | ||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:71 | ||
msgid "Enable navigation sounds" | ||
msgstr "" | ||
|
||
#: | ||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:75 | ||
msgid "Disable sayRoles" | ||
msgstr "" | ||
|
||
#: | ||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:77 | ||
msgid "Enable sayRoles" | ||
msgstr "" | ||
|
||
#: | ||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:80 | ||
msgid "Pressing it once toggles between on and off object sounds, and Pressing twice it toggles between reading and disabling object types." | ||
msgstr "" | ||
|
||
#: | ||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:88 | ||
msgid "select sound" | ||
msgstr "" | ||
|
||
#: | ||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:92 | ||
msgid "say roles" | ||
msgstr "" | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) YEAR ORGANIZATION | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: navigation sounds 1.0\n" | ||
"POT-Creation-Date: 2023-09-02 13:56+0300\n" | ||
"PO-Revision-Date: 2023-09-02 13:58+0300\n" | ||
"Last-Translator: \n" | ||
"Language-Team: mesteranas\n" | ||
"Language: ar\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : " | ||
"n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n" | ||
"Generated-By: pygettext.py 1.5\n" | ||
"X-Generator: Poedit 3.3.2\n" | ||
|
||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:49 | ||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:85 | ||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:94 | ||
msgid "navigation sounds" | ||
msgstr "أصوات التنقل" | ||
|
||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:69 | ||
msgid "Disable navigation sounds" | ||
msgstr "تعطيل أصوات التنقل" | ||
|
||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:71 | ||
msgid "Enable navigation sounds" | ||
msgstr "تفعيل أصوات التنقل" | ||
|
||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:75 | ||
msgid "Disable sayRoles" | ||
msgstr "تعطيل نطق أنواع ألكائنات" | ||
|
||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:77 | ||
msgid "Enable sayRoles" | ||
msgstr "تفعيل نطق أنواع ألكائنات" | ||
|
||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:80 | ||
msgid "" | ||
"Pressing it once toggles between on and off object sounds, and Pressing " | ||
"twice it toggles between reading and disabling object types." | ||
msgstr "" | ||
"يؤدي الضغط عليه مرة واحدة إلى التبديل بين تشغيل وإيقاف أصوات الكائنات، " | ||
"والضغط عليه مرتين يؤدي إلى التبديل بين قراءة أنواع الكائنات وتعطيلها." | ||
|
||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:88 | ||
msgid "select sound" | ||
msgstr "اختيار الصوت" | ||
|
||
#: C:\Users\Mesteranas1\AppData\Roaming\nvda\addons\NavigationSounds\globalPlugins\NavigationSounds\__init__.py:92 | ||
msgid "say roles" | ||
msgstr "نطق أنواع الكائنات" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
summary = "أصوات التنقل" | ||
description = """تشغيل أصوات عند الحركة""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
name = navsounds | ||
name = navSounds | ||
summary = "Navigation sound effects" | ||
description = "provides navigation sounds based on different roles when interacting with the screen reader" elements." | ||
author = "AhmedTheBest" | ||
description = "provides navigation sounds based on different roles when interacting with the NVDA" | ||
author = "AhmedTheBest with a Contributions of mesteranas" | ||
url = "https://github.com/ahmedthebest31/navsounds/" | ||
version = 1.0.0 | ||
version = 1.2.0 | ||
docFileName = None | ||
minimumNVDAVersion = 2019.3.0 | ||
lastTestedNVDAVersion = 2030.1.0 | ||
lastTestedNVDAVersion = 2023.1.0 | ||
updateChannel = None |
Binary file not shown.