Talon was built from the ground up to be endlessly configurable. Fortunately, the knausj_talon repository means that I don't have to create a set of Talon scripts on my own. However, the default knausj installation has a lot of things that I like to tweak to make it far more usable.

Stop Talon From Waking Up So Easily

There is a known issue where Talon wakes up too easily from sleep mode, and the current fix for it is to go to sleep_mode.talon and uncomment line #9

<phrase>: skip() 

The reason Talon wakes up too easily is that it is very eager about interpreting what people say as a command. In sleep mode, there are very few commands. When it hearing random spoken audio, Talon tries very hard to match it to the commands available to it, and it succeeds in matching the command 'talon wake' way more often than it ought to. Usually, this means Talon wakes up and starts responding when you don't want it to respond.

The line

<phrase>: skip() 

tells Talon to listen to every possible phrase (that's the <phrase> part) and to skip it (that's the skip part).

So now Talon recognizes everything, and matches and dismisses most of it. That means that it becomes a lot more choosy about recognizing the command 'talon wake.' It becomes a lot pickier about recognizing the actual wake-up commands for what they are.

Turning On The Mouse Grid

If I want to be able to control my mouse with voice commands, turning on the Mouse Grid is essential.

To do this, I go to the knausj_talon-master folder in my user directory and open the settings file. I go to line 32 and uncomment it so that it goes from looking like this:

# uncomment tag to enable mouse grid
# tag(): user.mouse_grid_enabled

to looking like this:

# uncomment tag to enable mouse grid
tag(): user.mouse_grid_enabled

I make especially sure not to leave any leading whitespace in front of tag(), otherwise, it won't work. In Talon files whitespace matters.

Make The Help Menu Big Enough To Read

Also in settings.talon, it is possible to adjust the size of the text in the help menus so that they are not so unreadably tiny. I like to set mine at size 3 so I can read them.

    #adjust the scale of the imgui to my liking
    imgui.scale = 3

Adjust The Help Menu So That It Does Not Expand Past The Bottom Of The Screen

Lowering the number of lines shown on each page of the help menu makes it so that the help menu won't run off the bottom of the screen. When I set my imgui.scale size to 3, then help pages (like the help page for symbols) reach down past the bottom of my screen.

In settings.talon, I change

    user.help_max_contexts_per_page = 50


    user.help_max_contexts_per_page = 20

This will make the contents of particularly long help menus, stay with my screen. This will also make the file take up four pages instead of two, but it's worth it to have it all fit on the screen.

Allow For Longer Pauses Between Commands

When I first start learning Talon, often I'll have to stop and think about what I'm trying to say. For example, the command "sentence" is the command to start saying a sentence. Right after the word "sentence," sometimes I'll have to pause to remember what sentence I was trying to say. The default timeout for pauses in Talon is too short for this 'trying to remember what to say next' pause.

The default setting for how long a pause has to be before talon differentiates what comes next as a new command is 0.15 seconds.

To change this, I go to settings.talon, and in the settings block, add the setting

    speech.timeout = 0.4

The settings block should look like this:

    #adjust how quickly I have to say command phrases. Default is .15
    speech.timeout = 0.4
    #adjust the scale of the imgui to my liking
    imgui.scale = 3
    # enable if you'd like the picker gui to automatically appear when explorer has focus
    user.file_manager_auto_show_pickers = 0
    #set the max number of command lines per page in help
    user.help_max_command_lines_per_page = 20
    # set the max number of contexts display per page in help
    user.help_max_contexts_per_page = 20
    # The default amount used when scrolling continuously
    user.mouse_continuous_scroll_amount = 80
    #stop continuous scroll/gaze scroll with a pop
    user.mouse_enable_pop_stops_scroll = 1
    #enable pop click with 'control mouse' mode
    #user.mouse_enable_pop_click = 1
    #When enabled, the 'Scroll Mouse' GUI will not be shown.
    user.mouse_hide_mouse_gui = 0
    #hide cursor when mouse_wake is called to enable zoom mouse
    user.mouse_wake_hides_cursor = 0
    #the amount to scroll up/down (equivalent to mouse wheel on Windows by default)
    user.mouse_wheel_down_amount = 120
    #mouse grid and friends put the number one on the bottom left (vs on the top left)
    user.grids_put_one_bottom_left = 1
    # the number of lines of command history to display by default
    user.command_history_display = 10
    # the number of lines of command history to keep in total;
    # "command history more" to display all of them, "command history less" to restore
    user.command_history_size = 50

Easily Check The Quality Of Audio By Automatically Recording Commands For Later Review

One of the main reasons Talon doesn't appear to work is because the quality of audio it is getting isn't good enough for the voice engine component to understand it. Talon has a setting that lets it automatically record individual commands. When this setting is turned on, it will create a folder called recordings and place it in the Talon home directory. That folder will fill with short audio recordings.

The name of each recording is what Talon heard me say. If a file-name sounds particularly strange to me, playing the recording will tell me if the strange file name is caused by Talon not being able to interpret the audio it is getting as words.

These recordings are stripped of all time-stamp data and ordering so that it is very hard for a person to take them and piece together what you said and when for nefarious purposes.

For example, I have a file named

bang say easy somewhat fail avid-Ghaxhe.flac

and, on listening to it, it turned out to be a snippit of a phone conversation that from the other side of my apartment.

To have Talon start recording, put

    speech.record_all = 1

in a settings block. The easiest place to put it is in the settings block in settings.talon.


    #Record snippits of Talon commands in order to check audio. 
    speech.record_all = 1
    #adjust the scale of the imgui to my liking
    imgui.scale = 3

Note: currently, when speech.record is on, and I also have the : skip() command active in speech mode, this will record everything I say while Talon is asleep. This is because speech.record_all records everything Talon recognized as a command, and <phrase>:skip() is a command that recognizes every single phrase that is said. As a result, I usually end up with a folder full of random snippets of conversation, none of which I wanted to be recorded at all. That's why I have a random snippit from a distance phone conversation in my recordings file: talon keeps recording when it is asleep.