community
The community
repository provides a comprehensive, community-supported configuration for the Talon voice control system. It includes a wide array of features, from basic text manipulation and keyboard shortcuts to application-specific commands and advanced code editing tools.
The repository leverages several key dependencies:
- Talon: The core voice control system which provides the framework to execute voice commands, manage contexts, and interact with the operating system. All the files in this repository extend and customize Talon's functionality.
- Python: Used extensively for implementing core logic, actions, and UI elements for Talon extensions and language support.
- Skia: Used by Talon, particularly for drawing custom UIs such as the mode indicator and mouse grid.
- imgui: A cross-platform UI library that is used by Talon to create custom GUIs, including help windows and command pickers.
- cubeb: A cross-platform audio API that provides support for microphone selection in Talon.
- pre-commit: A tool that manages and runs code linters and formatters.
- pytest: A Python testing framework that provides the ability to test Talon functionality without launching the full application.
- Various external libraries and command line utilities: Some features rely on external tools or APIs to operate (e.g.,
i3-msg
for i3 window management,wslpath
for path translation in WSL, andcurl
for remote procedure calls).
Here's a breakdown of the most important and interesting subdirectories and files:
-
The
core
directory contains the fundamental functionality of the Talon community configuration. It manages aspects of Talon such as text manipulation, code snippets, vocabulary, key bindings, application switching, and many other core systems.core/abbreviate
defines a system for expanding abbreviations based on a dictionary and a CSV file.core/app_switcher
provides functionality to switch between and launch applications using voice commands, using platform-specific CSV files to manage application names and overrides.core/edit
implements core editing functionality for Talon, including actions for navigation, selection, and text manipulation. It includes platform-specific files and advanced editing capabilities.core/file_extension
enables users to speak file extensions using a Talon list populated by a CSV file.core/formatters
defines text formatters, used to format text based on surrounding context.core/help
provides a help system for Talon, including an ImGui window, and support for showing the current Talon scope.core/homophones
implements a GUI for selecting homophones using a CSV file and actions.core/keys
provides configuration files for mapping spoken words to keyboard keys, including platform-specific definitions and a phonetic alphabet.core/menu_choose
allows for selecting items from menus using voice commands.core/modes
defines and manages different modes of operation, such as "sleep", "command", "dictation", and various language modes, including platform specific handling for Dragon and Wav2Letter.core/mouse_grid
contains the code for the mouse grid system.core/navigation
provides context-aware navigation with different keybindings for browser, macOS, and other contexts.core/numbers
contains logic for parsing and representing numbers using voice commands, including prefixed and unprefixed numbers, and ordinal numbers.core/screens
manages and displays information about multiple screens.core/snippets
manages code snippets, including logic for parsing, inserting, and managing language-aware snippets stored in thecore/snippets/snippets
subdirectory.core/text
defines how Talon handles text input and formatting, including lists of words, phrases, and core logic for text manipulation and dictation.core/vocabulary
manages custom vocabulary and word replacements, using a CSV file and a Talon list for user customizations.core/websites_and_search_engines
allows users to quickly navigate to websites and perform searches using voice commands.core/windows_and_tabs
manages windows and tabs across different operating systems, including support for snapping windows to different screen positions.
-
The
apps
directory contains configurations for a wide variety of specific applications, including terminals, IDEs, browsers, and messaging apps. It often uses a combination of.talon
files for voice commands and.py
files for implementing the underlying logic and actions. The files are often platform-specific. - Many of the subdirectories provide their own
README.md
file describing how they work. -
apps/vscode
provides particularly comprehensive support for VS Code using a file-based RPC system. Its subdirectory,apps/vscode/command_client
provides the details of that RPC system, andapps/vscode/command_client/rpc_client
provides the core implementation for the file based communication. -
The
plugin
directory contains a variety of extensions to Talon, ranging from basic text manipulation and command repetition to complex desktop management and custom UI elements.plugin/macro
implements a macro recording and playback system.plugin/desktops
enables cross-platform virtual desktop management.plugin/mouse
provides comprehensive mouse control.plugin/talon_draft_window
implements a dedicated text editing window using word labels for voice-driven manipulation.plugin/repeater
enables repeating commands and phrases.plugin/datetimeinsert
provides a plugin for inserting date and time formats.plugin/cancel
provides a way to cancel a spoken command using a specific phrase.plugin/subtitles
displays subtitles of speech input on the screen.plugin/are_you_sure
implements a confirmation dialog before executing potentially destructive actions.plugin/talon_helpers
provides helper utilities for debugging and working with Talon, and an action to create new app contexts.plugin/gamepad
provides gamepad support for Talon.plugin/text_navigation
implements advanced text navigation.plugin/then
provides a "then" command to chain otherwise ambiguous commands.plugin/microphone_selection
provides a microphone selection UI.plugin/draft_editor
enables using a text editor as a draft editor.plugin/symbols
defines commands for inserting and wrapping text with symbols.plugin/media
implements basic media controls.plugin/command_history
adds command history functionality to Talon.plugin/screenshot
provides screenshot functionality.plugin/mode_indicator
displays a graphical mode indicator.plugin/listening_timeout
implements a timeout for speech recognition.
-
The
tags
directory contains a collection of subdirectories, each representing a different tag used to group related commands and functionality in Talon. These subdirectories provide reusable components for adding common features:tags/messaging
implements commands for controlling multi-channel messaging applications.tags/file_manager
provides a way to interact with the file system.tags/browser
defines common browser actions.tags/command_search
allows searching for and executing other Talon commands by name or description.tags/chapters
provides a way to navigate chapters in a reader application.tags/pages
provides commands for page navigation.tags/splits
manages window splits.tags/find
implements a simple find functionality.tags/line_commands
provides a set of line navigation and manipulation commands.tags/emoji
contains functionality for inserting emoji, emoticons, and kaomoji.tags/find_and_replace
provides advanced find and replace functionality.tags/debugger
provides voice control for debuggers.tags/multiple_cursors
adds support for multiple cursors.tags/terminal
provides support for interacting with terminal applications.tags/address
provides a way to navigate to locations using an address such as a file path.
-
The
lang
directory contains support for a variety of programming and markup languages, including Python, Rust, Lua, Terraform, R, SQL, Scala, Protocol Buffer, PHP, C#, CSS, HTML, Java, C, Batch, Ruby, Elixir, Kotlin, Typescript, Talon, Javascript, Vimscript, and Markdown. Each language subdirectory typically includes a.py
file defining core logic, lists, and actions, and a.talon
file for voice commands. Thelang/tags
directory provides a reusable set of rules that can be included in other language modules. -
The
test
directory provides tests for the community repository, with stub implementations of the Talon APIs for use in automated tests.- The
test/stubs
directory provides a stub implementation of the Talon API, allowing for isolated and faster testing, using python files in thetest/stubs/talon
subdirectory.
- The
-
The
migration_helpers
directory provides functionality to convert CSV files into.talon-list
files, a more robust method of managing Talon lists. -
The
core/snippets/snippets
directory stores.snippet
files that define code snippets, and the core logic for handling snippets is located incore/snippets
. -
The
core/vocabulary
directory defines how custom vocabulary is loaded, modified, and used by Talon. -
The
core/keys
directory contains configuration files for mapping spoken words to keyboard keys, with platform specific lists for special and modifier keys. -
The
core/websites_and_search_engines
directory defines lists of websites and search engines and allows for using them through voice commands. -
The
core/edit_text_file
directory allows opening commonly edited text files using a preferred text editor. -
The
core/modes
directory defines and manages different modes of operation for Talon. -
The
core/formatters
directory provides functionality for formatting text within Talon. -
The
core/navigation
directory defines actions for navigating forward and backward, using different keybindings based on the context. -
The
core/numbers
directory provides files for parsing and representing numbers using voice commands, including prefixed and unprefixed numbers and ordinal numbers. -
The
core/help
directory provides a help system for Talon, using ImGUI. -
The
core/menu_choose
directory implements functionality for selecting items from menus using voice commands. -
The
core/homophones
directory implements a GUI for selecting homophones. -
The
core/windows_and_tabs
directory manages windows and tabs across different operating systems. -
The
core/mouse_grid
directory implements a system for moving the mouse using a grid. -
The
core/file_extension
directory implements commands for inserting file extensions. -
The
core/screens
directory provides functionality to manage and show information about multiple screens. -
The
_github
directory contains configuration files for GitHub features, such as workflows (in the_github/workflows
subdirectory) and Dependabot.
In summary, this repository is a complex and comprehensive configuration for the Talon voice control system. It provides a large number of features for text editing, code writing, application control, and system management, and all of these pieces work together to provide a cohesive and highly customizable experience.