Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TalkType is a push-to-talk voice typing tool that works system-wide. Press F9, s

```bash
# Linux dependencies
sudo apt install xdotool xclip portaudio19-dev
sudo apt install xautomation wmctrl x11-utils portaudio19-dev

# macOS dependencies
brew install portaudio
Expand Down Expand Up @@ -197,7 +197,7 @@ TalkType has two recovery mechanisms:

### Platform Differences

Linux uses xdotool/xclip. Windows/macOS use pyautogui. The `is_terminal_window()` function has OS-specific terminal detection to choose the correct paste shortcut.
Linux uses xte (xautomation) to type text character by character; wmctrl/xprop handle window focus. Windows/macOS use pyautogui.write(). No clipboard or paste shortcuts are used.

## Testing Changes

Expand Down
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# scottnotrobot fork - hacked this for my own use only on linux

there's a fix here for groq, which i'm liking

but more importantly i found xdotool would differentiate terminals
from other apps like mousepad and synergy and use ctrl-v instead of
typing. i wanted talktype to ALWAYS emulate typing... e.g. sometimes
apps override ctrl-shift-v or whatever so plain typing just seems more
universal to me. in particular allowing it to type into a
synergy/deskflow/etc type external machine.

# TalkType

**Push-to-talk voice typing for your terminal.**
Expand All @@ -23,7 +34,7 @@ Built for developers who want:
- **Cross-platform**: Linux, Windows, macOS
- **Local Whisper**: Uses faster-whisper for fast, private transcription
- **API mode**: Connect to any Whisper-compatible API server
- **Smart paste**: Auto-detects terminals vs other apps (Ctrl+Shift+V vs Ctrl+V)
- **Direct typing**: Text is typed character by character (xte) — no clipboard, no paste shortcuts
- **Window focus**: Remembers where you started — switch apps while speaking
- **Configurable**: Choose your hotkey, model size, and language

Expand All @@ -33,7 +44,7 @@ Built for developers who want:

```bash
git clone https://github.com/lmacan1/talktype.git && cd talktype
sudo apt install xdotool xclip portaudio19-dev
sudo apt install xautomation wmctrl x11-utils portaudio19-dev
python3 -m venv venv && source venv/bin/activate
pip install -e .
talktype # Setup wizard launches automatically
Expand All @@ -43,7 +54,7 @@ talktype # Setup wizard launches automatically

```bash
# System dependencies
sudo apt install xdotool xclip portaudio19-dev
sudo apt install xautomation wmctrl x11-utils portaudio19-dev

# Clone and install
git clone https://github.com/lmacan1/talktype.git
Expand Down Expand Up @@ -302,7 +313,7 @@ TalkType works in any browser text field — it's not just for terminals:
2. Press F9, speak, press F9
3. Your words appear in the browser

Since TalkType uses clipboard + standard paste (Ctrl+V / Cmd+V), it works anywhere that accepts pasted text.
Since TalkType types each character directly (no clipboard involved), it works anywhere that accepts keyboard input.

## Troubleshooting

Expand Down Expand Up @@ -332,7 +343,7 @@ Make sure your microphone is set as the default input device in Windows Sound se
1. **Global hotkey capture** (pynput) — works even when other apps are focused
2. **Audio recording** (sounddevice) — captures from your microphone
3. **Local transcription** (faster-whisper) — Whisper running on your machine
4. **Smart paste** (pyperclip + OS-specific) — detects terminal vs other apps
4. **Direct typing** (xte on Linux, pyautogui elsewhere) — types each character into the focused window

```
[F9 Press] → Start Recording → [Speak] → [F9 Press] → Stop Recording
Expand All @@ -341,14 +352,14 @@ Make sure your microphone is set as the default input device in Windows Sound se
Focus Original Window
Paste Text
Type Text (xte)
```

## Contributing

Contributions welcome! Some ideas:
- [ ] Voice activity detection (auto-stop on silence)
- [ ] Wayland support (wtype instead of xdotool)
- [ ] Wayland support (wtype instead of xte)
- [ ] Tray icon / visual indicator
- [ ] Custom vocabulary/prompts
- [ ] Streaming transcription
Expand Down
12 changes: 6 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,25 @@ echo "Installing system dependencies..."
case "$DISTRO" in
ubuntu|debian|linuxmint)
sudo apt-get update -qq
sudo apt-get install -y -qq xdotool xclip portaudio19-dev python3-venv
sudo apt-get install -y -qq xautomation wmctrl x11-utils portaudio19-dev python3-venv
;;
fedora|centos|rhel)
sudo dnf check-update || sudo yum check-update # Check if dnf is available, otherwise try yum
sudo dnf install -y xdotool xclip portaudio-devel python3-venv || \
sudo yum install -y xdotool xclip portaudio-devel python3-venv
sudo dnf install -y xautomation wmctrl xorg-x11-utils portaudio-devel python3-venv || \
sudo yum install -y xautomation wmctrl xorg-x11-utils portaudio-devel python3-venv
;;
arch|manjaro)
sudo pacman -Sy --noconfirm
sudo pacman -S --noconfirm xdotool xclip portaudio python-venv
sudo pacman -S --noconfirm xautomation wmctrl xorg-xprop portaudio python-venv
;;
suse|opensuse|sles)
sudo zypper refresh
sudo zypper install -y xdotool xclip portaudio-devel # venv comes with python in arch
sudo zypper install -y xautomation wmctrl xprop portaudio-devel # venv comes with python in arch
;;
*)
echo "Unsupported distribution: $DISTRO"
echo "Attempting to install common dependencies. This might fail."
echo "Please install 'xdotool', 'xclip', 'portaudio-dev' (or equivalent), and 'python3-venv' manually."
echo "Please install 'xautomation' (for xte), 'wmctrl', 'xprop', 'portaudio-dev' (or equivalent), and 'python3-venv' manually."
;;
esac

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ dependencies = [
"scipy>=1.10.0",
"sounddevice>=0.4.6",
"pynput>=1.7.6",
"pyperclip>=1.8.2",
"requests>=2.28.0",
"rich>=13.0.0",
"pyyaml>=6.0",
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ numpy>=1.24.0
scipy>=1.10.0
sounddevice>=0.4.6
pynput>=1.7.6
pyperclip>=1.8.2
requests>=2.28.0
rich>=13.0.0
pyyaml>=6.0
Expand All @@ -17,5 +16,5 @@ fastapi>=0.100.0
uvicorn>=0.22.0
python-multipart>=0.0.6

# Windows/macOS keyboard simulation (Linux uses xdotool)
# Windows/macOS keyboard simulation (Linux uses xte from the xautomation package)
pyautogui>=0.9.53; sys_platform != 'linux'
Loading