Presented by Matthew Horspool for the Technology Association of Visually Impaired People, Wednesday 4 August 2021 at 7:30 PM
This session is split into three parts, each lasting just under half an hour with time for questions.
In part 1, we will cover:
- The purpose of speech and sounds schemes and the Speech and Sounds Manager
- Creating a new scheme
- The meaning of “window”, “control type” and “control state”
- Assigning alternative names to control types and states
- Assigning sounds to control types and states
- Changing the order in which information is spoken
- Avoiding conflicts
In part 2, we will cover:
- The purpose of voice aliases
- Modifying the voice alias for all caps
- Changing capital indication level
- The meaning of “attribute”, “font name” and “font size”
- Assigning voice aliases to the above
- A brief look at colour, indentation and miscellaneous settings
In part 3, we will cover:
- The syntax of vpf and smf files
- Defining control types not in the UI
- Defining attributes
- SpellingAttributeOverride and GrammarAttributeOverride
- Defining style behaviours
Speech and sounds schemes allow you to assign different voices, sounds and/or text labels to text and controls based on their type and/or text, or silence control type and state announcements altogether. For example, you could:
- Play piano notes for different levels of heading
- Slow down for bold or underlined text
- Change pitch for spelling and grammar errors
- Silence the announcement of the menu bar
The Speech and Sounds Manager is a part of Settings Centre and is the area of JAWS where speech and sounds schemes are created, modified and deleted.
To find it, go to Settings Centre/Speech And Sounds Schemes. Here, you can change the active scheme, view its description, or modify schemes. You might like to press F6 to make exploring this part of the Settings Centre a bit easier.
To create a new scheme, choose “Modify Scheme …”, then “Create New Scheme”. The new scheme will inherit the settings of the scheme selected in the combo box to begin with.
Enter a scheme description. You will have the opportunity to name your scheme later.
The dialog has several tabs. The first three are “General”, “control Type” and “Control State”.
Examples of control type include: checkbox, radio button, combo box, list box, list view, tree view, edit box and button.
Examples of control states include: checked, unchecked, opened, closed and disabled.
Sometimes, the line between a control type and a control state is blurred. For example, a read only edit box is a specific type of control, not a regular edit box with a state of read only.
HTML elements, such as links and headings, are not strictly speaking control types, but they are handled as though they are control types in the Speech and Sounds Manager.
Example 1: Emulating the Behaviour of Supernova
People who have used Supernova will be familiar with the term “Pulldown Listbox”. This is Supernova’s term for a “Combo Box”.
Supernova also said “Radio” where JAWS says “Radio Button”.
In JAWS, we can emulate this behaviour:
- On the “Control Type” tab, in the list, find “Combo box”.
- Set the group of radio buttons to “Speak control type”.
- In the “Text” edit field, type “Pulldown Listbox”.
- Repeat for “Radio button”.
Supernova users will also recall that Supernova refers to checkboxes as either “Selected” or “Unselected”, not “Checked” and “Unchecked” as JAWS does. We can emulate this as well:
- On the “Control State” tab, find “Checked”.
- In the group of radio buttons, choose “Speak control state”.
- In the “Text” edit field, type “Selected”.
- Repeat these steps for “Unchecked”.
At this point we will save the scheme and see what happens.
Press OK and you will be asked to save the scheme.
When you’ve done this, you will be asked if you’d like to make the scheme the default. Choose “Yes”.
Press ALT+F4 to exit Settings Centre and, if prompted to save changes, answer “Yes”.
Now, find a dialog and tab round. We will use the JAWS Basic Settings dialog. Notice how the controls and their states are announced differently.
Tip: If they are not, press ALT+JAWSKey+S and make sure the scheme is set correctly.
Why would you want to do this? These are bad examples, but you could make control types shorter. For example, “Radio” for radio button or “Box” for checkbox.
Now we will assign sounds to these controls instead:
Go back to “Modify Schemes” and choose “Edit” after you have selected your scheme in the list.
Example 2: Sounds
- Find “Combo Box”, again.
- In the group of radio buttons, choose “Play Sound”.
- Press the “Select Wave File” button.
- Find a suitable one in the list. You can sample the selected file by pressing SPACE. Files are stored in a folder called “Sounds” in your JAWS user settings directory, or in shared settings. Alternatively, use the browse button.
- Press ENTER when you have chosen your sound.
- Find “Checkbox”.
- In the group of radio buttons, choose “Ignore”.
- Repeat for “Radio button”.
- On the “Control State” tab, in the list, find “Checked”.
- In the group of radio buttons, choose “Play Sound” and proceed as above.
- Repeat for “Unchecked”.
- Press OK, then OK, and finally ALT+F4 to save changes.
We will explore the JAWS Basic Settings dialog again and listen out for our new sounds.
Theoretically, this should save time. However, notice that the sound is currently not playing until the speech would say the control type or state. We can remedy this in:
Settings Centre/Text Processing/General and check the following two checkboxes:
- Say window type first
- Say window state first
Note that Window, in this case, refers to a logical window rather than a physical one, so applies equally to controls as dialogs and windows themselves.
Now try the Basics dialog again and notice the sounds play in parallel with the speech.
Note: control state is always spoken after control type unless only the control state is spoken first.
To avoid a conflict, you should avoid creating a situation where two similar behaviours trigger at the same time. For example, if there is a sound for checkbox, but also a sound for checked, JAWS will not cope well with playing two sounds at once. You should use a voice alias for the control type or state instead, or ignore one of them. The same logic applies for voice aliases – it can’t speak using both, so it will have to choose one, unless the two voice aliases modify different characteristics (one changes rate and one changes pitch, for example), in which case the two can cooperate.
A voice alias specifies the voice name, rate and pitch relative to the current voice.
Voice aliases are stored in voice profiles. Some exist by default, but if you create a custom voice alias and reference that in a speech and sounds scheme, you will need to make sure that it exists across all voice profiles you use for the scheme to work correctly.
The upside of this approach is that voice aliases can behave differently for different profiles. For example, for bold text, you can slow down in Eloquence but change the voice entirely in Vocalizer.
Voice aliases can be found in: Settings Centre/Voice Aliases/Customise Voice Aliases…
Example 3: AllCapsVoice
Find the voice alias called AllCapsVoice in the list.
Tab to Modify and press enter.
Explore the dialog. Set the pitch a bit higher than it is set currently.
OK, then OK again.
Staying in Settings Centre, navigate to: Text Processing/General
Find: Indicate Capitalization
Change to: Read by word, char, spell
Press ALT+F4 and save changes
Open a Notepad document and type “Jaws” (single cap) and “JAWS” (all caps).
CTRL+LeftArrow and CTRL+RightArrow through these two words and note the higher pitch when the entire word is capitalised.
We will now return to modify schemes and explore the next three tabs: “Attributes”, “Font name” and “Font size”.
Examples of attributes include: bold, italic, underline, superscript, subscript, misspelled, grammar error and hyperlink.
Examples of font names include: Arial, Times New Roman, MS Sans Serif, Helvetica, Calibri and Cambria.
Font sizes are expressed in numbers from 0 upwards.
All of these tabs work in a similar way. However, note that attributes can be combined. Hence, for example, since links are usually underlined, you may need to match on both “link” and “underline” for the entry to take.
We will match on “Bold” and use the “BoldVoice” alias which is already defined. Then open a Word document and make some text bold to show that it works.
There are a few other things you can do: for example, you can define colour behaviour (must specify foreground and background), indentation behaviour (justification and in spaces from the left edge), and miscellaneous settings like new line, new paragraph, borders, shading, repetition etc.
Note: for indentation to work properly, toggle the “Speak indented characters” setting in Settings Centre/Text Processing/General
These are located in VPF files in: %appdata%\freedom scientific\jaws\2021\settings\voiceprofiles
This is an INI-type file. If there is a version of the profile in shared settings, I.E. it is the default profile for a synthesizer, you only need to declare the keys that have changed, otherwise it is good practice to declare all keys.
Core voices have their own groups.
Voice aliases are all in one group per language and take the firm: alias=voice|pitch|rate
Defining an alias at user level that already exists at shared level will override the shared alias.
A second, optional group called “UI Voice Alias translation” allows you to declare a short name for the alias and then expand it to something longer for the user interface, although this is of course not what it was designed for!
These are located in smf files in: %appdata%\freedom scientific\jaws\2021\settings\enu
Again, this is an INI-type file.
The control types are found in: C:\programdata\Freedom Scientific\JAWS\2021\Scripts\HJConst.JSH
Search for wt_
A number of control types are not defined by default, but if you define them manually, they will appear in the UI.
Some control states are defined further down in HJConst.jsh (search for CTRL_) but others are not, and it’s not entirely clear to me what all the numbers mean.
Attributes are bitwise. The values are in the comments of classic.smf in shared settings.
For spelling and grammar to work properly, you may need to adjust two keys in the “options” group of default.jcf: SpellingAttributeOverride and GrammarAttributeOverride
Styles are defined in a StyleBehaviourTable group.
The syntax is: behavior|data1|data2|data3|data4
1: speak string using voice alias in data1, can optionally specify overriding text by inserting colon and text
2: play sound file (named in data2)
3: use voice alias (in data3) to announce text in given attribute combination/font/sty/e etc
4: read text in language specified in data4
To override default behaviour for all unlisted entries, add a behaviour to the default key.
If the default key is missing, JAWS will speak the item.