Skip to content

messaging

The community/tags/messaging directory establishes a unified, abstract interface for voice-controlling multi-channel messaging applications (such as Discord, Slack, or Microsoft Teams) within the Talon voice system.

By defining a common tag and standard actions, it allows you to use the same voice commands across different chat applications, while the actual keyboard shortcuts or API calls are implemented specifically for each application elsewhere in the repository.

How It Works

The messaging interface is split into two core files:

  • messaging.pyThe Interface Definition: This file registers the user.messaging tag and outlines the abstract actions that any messaging application should support. These actions represent common interactions like switching workspaces, finding channels, searching, and managing unread messages. Because they are defined without body implementations, they act as templates that application-specific scripts override.
  • messaging.talonThe Voice Commands: This file defines the verbal commands that trigger when the user.messaging tag is active. It maps natural spoken phrases to the abstract actions declared in the Python file.

Key Voice Commands

When a messaging application activates the user.messaging tag, the following categories of commands become available:

  • Workspace Navigation: Move between different servers or workspaces using "next workspace" / "previous server" (triggers messaging_workspace_next() / messaging_workspace_previous()).
  • Channel Navigation:
    • Move sequentially through channels using "channel up" and "channel down".
    • Jump directly to a specific channel using "channel <text>" (e.g., "channel general"), which opens the channel picker and types the formatted name.
    • Cycle through unread channels using "goneck" (go next) or "gopreev" (go previous).
  • Utility Operations: Search messages via "go search", mark channels or entire workspaces as read ("mark channel read", "mark all read"), and trigger file uploads via "upload file".