Talon is a proprietary voice control utility written in [[Python]] (mostly).
- [Website](https://talonvoice.com/)
- GitHub
- [Documentation](https://talonvoice.com/docs/)
- AlternativeTo
> QUOTE
# Notability
Application and API for voice control. Used by the [[VS Code]]'s [[Cursorless]] extension.
# Philosophy
## Custom EULA
- [EULA](https://talonvoice.com/EULA.txt)
Free with paid extensions, donations, and patreon. Fairly liberal with their source usage. No reverse-engineering restrictions.
## Dependencies
- Uses [[GUI - ImGui]] for UIs and overlays
- Integrates with [[Tobii]] hardware eye trackers
# OS Support
- Linux
- Mac
- Windows
# Features
# Tips
## Context Header
|Matcher|Description|
|---|---|
|`os`|require specific operating systems; currently either `linux`, `mac`, or `windows`|
|`tag`|require a specific tag|
|`mode`|only active for specific talon modes (like `command`, `dictation`, `sleep` et al.)|
|`app`|match applications by explicitly declared, well-known name|
|`app.name`|match applications by name (TODO where does Talon read this out?)|
|`app.exe`|match applications by executable, like `/usr/lib/firefox/firefox` or `firefox.exe`|
|`app.bundle`|match applications by their MacOS bundle, like `com.mozilla.Firefox`|
|`title`|match a window title|
|`code.language`|specify a currently active programming language|
|`language`|specify the particular human language (e.g. `pt_BR`, `en`) for the file. Defaults to `en` if not specified. Currently only needed for multilingual webspeech.|
|`hostname`|match the 'hostname' of your machine (from the `hostname` CLI command on Linux/Mac). Useful if you want to have a single set of custom config but have some machine-specific parts.|
## Script Functions
| Function | Example | Info |
| ----------- | ------------------------------- | ----------------------------------------------- |
| sleep | `sleep(100ms)` | Wait a certain amount of time before continuing |
| key | `key("enter")` | Press a key by name |
| repeat | `repeat(2)` | Repeats the previous scripted line $n$ times |
| insert | `insert("some text")` | Emulates a keyboard typing the text |
| auto_insert | `auto_insert("some text")` | As above, but pre-processed (how?) |
| app.notify | `app.notify("i did the thing")` | Display an app notification with text |
### Keys
- https://talon.wiki/Customization/Talon%20Library%20Reference/key_action
| Key name(s) | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| a z 0 9 - + ( ) etc. | Presses the key corresponding to the symbol |
| left<br>right<br>up<br>down | Arrow keys |
| backspace bksp | The backspace key (delete character to left) |
| delete del | The delete key (delete character to right) |
| escape esc | The escape key |
| pgup<br>pageup<br>pgdown<br>pagedown | The page up and page down keys |
| return enter | The enter key |
| tab<br>space | The tab and space keys |
| home<br>end | The home and end keys |
| alt<br>super<br>ctrl<br>shift | Can be held down with e.g. `key("shift:down")` (and released with :up) |
| ralt<br>rctrl<br>rshift | The key on the right hand side of the keyboard |
| capslock<br>scroll_lock<br>insert | Persistent mode switch keys |
| f1 f2 ... f35 | The f1 to f35 keys, many of these are probably not on your keyboard, but are nonetheless available |
| mute<br>voldown<br>volup<br>play<br>stop<br>play_pause<br>prev<br>next<br>rewind<br>fast_forward | Media keys |
| altgr | Can be combined with another key to add accents, e.g. `key("altgr:down e altgr:up")` produces "é". The dead_* keys might suit you better though. |
| menu<br>help<br>sysreq<br>printscr<br>compose | Miscellaneous keys |
| brightness_up<br>brightness_down | Screen brightness control |
| backlight_up<br>backlight_down<br>backlight_toggle | Maybe keyboard backlight controls? |
| keypad_0<br>keypad_1<br>...<br>keypad_9 | The number keys on a keypad |
| keypad_clear<br>keypad_enter<br>keypad_separator<br>keypad_decimal<br>keypad_plus<br>keypad_multiply<br>keypad_divide<br>keypad_minus<br>keypad_equals | Other keypad keys |
| dead_grave<br>dead_acute<br>dead_circumflex<br>dead_tilde<br>dead_macron<br>dead_breve<br>dead_abovedot<br>dead_diaeresis<br>dead_cedilla | Keys which causes the next key pressed to be accented. For example `key("dead_acute e")` produces "é". |
| dead_perispomeni<br>dead_abovering<br>dead_doubleacute<br>dead_caron<br>dead_ogonek<br>dead_voiced_sound<br>dead_semivoiced_sound<br>dead_belowdot<br>dead_hook<br>dead_horn<br>dead_iota<br>dead_stroke<br>dead_abovecomma<br>dead_psili<br>dead_abovereversedcomma<br>dead_dasia<br>dead_doublegrave<br>dead_belowring<br>dead_belowmacron<br>dead_belowcircumflex<br>dead_belowtilde<br>dead_belowbreve<br>dead_belowdiaeresis<br>dead_invertedbreve<br>dead_belowcomma<br>dead_currency<br>dead_lowline<br>dead_aboveverticalline<br>dead_belowverticalline<br>dead_longsolidusoverlay<br>dead_a<br>dead_e<br>dead_i<br>dead_o<br>dead_u<br>dead_small_schwa<br>dead_capital_schwa<br>dead_greek | Other keys which accent the next key pressed |
## Rules
| Syntax | Description | Matches |
| ---------------- | ------------------- | ------------------------------------------------------------------------------ |
| `foo` | Words | “foo” |
| `[foo]` | Optional | “foo” or null (nothing) |
| `foo*` | Zero or more | “”, “foo”, “foo foo”, ... |
| `foo+` | One or more | “foo”, “foo foo”, ... |
| `foo \| bar` | Choice | “foo”, “bar” |
| `(foo)` | Precedence/grouping | “foo” |
| `{some_list}` | List | Depends on the list. |
| `<some_capture>` | Capture | Depends on the capture. |
| `^foo` | Start anchor | Ensures that the command only matches at the *beginning* of an utterance block |
| `foo
| End anchor | Ensures that the command only matches at the *end* of an utterance block |
> Aside from special circumstances you really only consider anchoring when you have a command you wouldn't chain (e.g. switching from command to dictation mode), or you really want to prevent the command from being called by accident.
# Resources
## Unofficial Documentation
```cardlink
url: https://talon.wiki/Customization/basic_customization
title: "Basic customization | Talon Community Wiki"
description: "Once you have successfully set up Talon you may find that you would like to change some of how it behaves at a basic level."
host: talon.wiki
favicon: https://talon.wiki/img/talon-community-logo.png
image: https://talon.wiki/img/talon-community-logo-social.png
```
## Command Script Repo
```cardlink
url: https://github.com/talonhub/community
title: "GitHub - talonhub/community: Voice command set for Talon, community-supported."
description: "Voice command set for Talon, community-supported. Contribute to talonhub/community development by creating an account on GitHub."
host: github.com
favicon: https://github.githubassets.com/favicons/favicon.svg
image: https://opengraph.githubassets.com/2f0a2091ce3bd5c5a2bc0e68bcaca82502d9d2766549f299fcc1a7bed2fe30eb/talonhub/community
```
## Add-Ons
- https://github.com/C-Loftus/sight-free-talon - Integrate with screen readers and similar
# References
- https://blakewatson.com/journal/speaking-in-code-hands-free-input-with-talon/