Getting Started With Coding by Voice

Ever wonder what code dictation looks like? Here I present five levels of code dictation proficiency, from a very beginner level of spelling out the code letter by letter and symbol by symbol all the way up to intermediate level dictation using code structures and language-specific code syntax.

For my demos, I will write out the following code:

tag: user.chapters
-
chapter next: user.chapter_next()
chapter last: user.chapter_previous()
go chapter <number>: user.chapter_jump(number)
go chapter final: user.chapter_final()

Tara’s Talon Code Dictation Level 0: Spelling Out Code Character by Character

It’s possible to get started dictating code quickly and fairly simply by spelling out the code letter by letter. In order to do this, you need to know the letter commands and the symbol commands, and more specifically, where to look them up.

I wrote this code using exclusively the commands found on the alphabet command list, the special keys list, and the symbols list. You can bring up these lists by saying help alphabet, help special keys, and help symbols.

The advantage of these commands is that this is a simple, introductory way to get started. It also teaches you how to write any word that uses English letters, numbers, and symbols, regardless of how the word spelled.

The disadvantage is that spelling things out is mentally exhausing even if you know the Talon Phonetic alphabet, and doing this method as your main way of dictating code often leads to vocal strain, which is a demoralizing new injury for many people who use Talon because their hands don’t work.

user.letter list
description : The spoken phonetic alphabet
air a
bat b
cap c
drum d
each e
fine f
gust g
harp h
sit i
jury j
crunch k
look l
made m
near n
odd o
pit p
quench q
red r
sun s
trap t
urge u
vest v
whale w
plex x
yank y
zip z
user.special-key list
description : All special keys
end end
enter enter
escape escape
home home
insert insert
pagedown pagedown
pageup pageup
space space
tab tab
delete backspace
forward delete delete
page up pageup
page down pagedown
menu key menu
print screen printscr
user.symbol-key list
description : All symbols from the keyboard
dot .
point .
quote '
apostrophe '
L square [
left square [
square [
R square ]
right square ]
slash /
backslash \
minus -
dash -
equals =
plus +
tilde ~
bang !
down score -
under score -
paren (
L paren (
left paren (
R paren )
right paren )
brace {
left brace {
R brace }
right brace }
angle <
left angle <
less than <
rangle >
R angle >
right angle >
greater than >
star *
hash #
percent %
caret ^
amper &
pipe |
dubquote "
double quote "
dollar $
pound £
` `
, ,
back tick `
grave `
comma ,
period .
full stop .
semicolon ;
colon :
forward slash /
question mark ?
exclamation mark !
exclamation point !
asterisk *
hash sign #
number sign #
percent sign %
at sign @
and sign &
ampersand &
dollar sign $
pound sign £

Tara’s Talon Coding Level 1: Writing With Words and Phrases

Dictating word by word and phrase by phrase levels up my code dictating skills. When combined with the symbol and special key commands, it is possible to write out code word by word and phrase by phrase.

The advantage of these commands is that this is a simple, introductory way to get started. It also teaches you how to write any english phrase.

This method is less mentally taxing than spelling things out letter by letter.

Formatters
phrase <user.text> Inserts a phrase
word <user.word> Inserts a single word.

Tara’s Talon Code Dictation Level 2: Writing Code With Formatters

Code often has special formats, like putting_underscores_in_phrases (a style called ‘snake case’ or makingPhrasesBeSmashedTogetherLikeThis (a style called camel case). This movie shows what’s possible when you add formatters to the set of commands used to dictate code. The formatters are available from the menu help formatters.

user.formatters list
description : list of formatters
allcaps THE QUICK BROWN FOX
alldown the quick brown fox
camel theQuickBrownFox
dotted the.quick.brown.fox
dubstring "the quick brown fox""
dunder __the__quickbrownfox__
hammer TheQuickBrownFox
kebab the-quick-brown-box
packed the::quick::brown::fox
padded the quick brown fox
slasher /the/quick/brown/fox
smash thequickbrownfox
snake the_quick_brown_fox
string 'the quick brown fox''
title The Quick Brown fox

Tara’s Talon Code Dictation Level 3: Chaining Formatters With the Over Command

This video introduces the idea of command chains. One of the most exciting things about command chains is that you can say several commands, one after the other, and Talon will recognize and do them one after the other.

With commands like formatters that allows you to say arbitrary phrases, you need to have a word that tells when the phrase is over. In knausj, that word is the actual word ‘over.’

Tara’s Talon Code Dictation Level 4: Syntax Level Programming With Language Specific Commands

This video is where I start to show off the true power of Talon when dictating code. Since Talon allows you to define anything as a voice command, that means you can take abstract code syntax like includes and functions and make them into a voice command. This means, instead of spelling things out character by charact or word by word, you get to think of things at a code syntax level.

I found this mentally taxing since I have to know what talon syntax is and what the commands are. Fortunately, I could look up the commands in the Talon context menu with the command help talon context.

Talon
description : Talon Syntax File
dot talon Insert ".talon".
setting block Insert "settings():\n ".
setting {user.talon-settings} Inserts a particular setting (if it is on the talon settings list
win require Insert "os: windows\n".
mac require Insert "os: mac\n".
linux require Insert "os: linux\n".
title require Insert "win.title: ".
application [require] {user.talon-apps} Inserts the app matcher, if the app named is on the talon-apps list
mode require {user.talon-modes} Inserts a named talon mode from the talon modes list
tag require {user.talon-tags} Inserts a talon tag from the talon tags list
tag set {user.talon-tags} inserts a named tag from the tag list, or if it doesn't recognize the tag name, will insert tag():
list {user.talon-lists} Inserts the named talon list.
capture {user.talon-captures} Inserts the named talon capture.
key <user.keys> over Inserts a sequence of named keys
key <user.modifiers> over Inserts the named modifier keyes
funk {user.talon-actions} Inserts the named action.
Written on April 30, 2022