Skip to content

Conversation

@thanhdatle
Copy link

Add automatic Enter key press on "Over" voice command

This feature enables hands-free message submission by automatically pressing Enter when transcribed audio ends with "Over".

What it does

When recording audio that ends with "Over" (case-insensitive, with optional punctuation), the system will:

  1. Remove "Over" from the transcribed text before delivery
  2. Deliver the cleaned text normally (clipboard/cursor writing)
  3. Automatically press Enter to submit the message

Use case

Perfect for voice-to-chat workflows with Claude or other interfaces where you want to record a message, have it transcribed and automatically submitted without
manual interaction.

Example:

  • Say: "Hello Claude, can you help me debug this code? Over."
  • Result: "Hello Claude, can you help me debug this code?" → Enter pressed automatically

Implementation

Backend (Rust):

  • Added press_enter() function using existing enigo library with cross-platform key codes
  • Registered new Tauri command handler

Frontend (TypeScript):

  • Extended text service interface with pressEnter() method
  • Added detection utilities in transcription-triggers.ts:
    • shouldTriggerEnterOnOver() - detects "Over" at text end
    • removeOverFromEnd() - cleanly strips "Over" and punctuation
  • Integrated into delivery pipeline to process text before clipboard/cursor operations

Flow:

  1. Transcription completes with "Over" detection
  2. Text gets cleaned (Over removed) before any delivery operations
  3. Normal delivery proceeds with cleaned text (clipboard, notifications, etc.)
  4. Enter key automatically pressed after 200ms delay

@rupokghosh
Copy link
Member

What happens when I am transcribing something and it actually has the word over? does it stop and press enter? That would not be an ideal behaviour.

@thanhdatle
Copy link
Author

What happens when I am transcribing something and it actually has the word over? does it stop and press enter? That would not be an ideal behaviour.

Thanks for asking the question.I'm using whispering to answer the question. I say over, but it doesn't trigger the Enter key.Only when I say over at the end.like this.
And it will hit the enter key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants