Metadata-Version: 2.4
Name: novavoice
Version: 0.1.3
Summary: Local, offline voice dictation daemon for Linux — hold Space, speak, release
Project-URL: Homepage, https://github.com/novafabric/novavoice
Project-URL: Repository, https://github.com/novafabric/novavoice
Project-URL: Bug Tracker, https://github.com/novafabric/novavoice/issues
Author-email: Mohsen Seyedkazemi Moghadam <mohsen.seyedkazemi@gmail.com>
License: Apache-2.0
License-File: LICENSE
Keywords: accessibility,dictation,linux,speech-to-text,voice,whisper
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: No Input/Output (Daemon)
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Requires-Python: >=3.11
Requires-Dist: evdev>=1.7
Requires-Dist: faster-whisper>=1.0
Requires-Dist: numpy>=2.0
Requires-Dist: sounddevice>=0.4.7
Requires-Dist: typer>=0.12
Description-Content-Type: text/markdown

# NovaVoice

Local, offline voice dictation for Linux. Hold Space anywhere on your desktop, speak, release — the transcribed text appears in whatever app is focused. No cloud, no GPU required.

[![Tests](https://github.com/novafabric/novavoice/actions/workflows/test.yml/badge.svg)](https://github.com/novafabric/novavoice/actions/workflows/test.yml)
[![PyPI](https://img.shields.io/pypi/v/novavoice)](https://pypi.org/project/novavoice/)

---

## How it works

```
Hold Space (> 0.5s) → microphone opens → speak → release Space → text appears
```

Powered by [faster-whisper](https://github.com/SYSTRAN/faster-whisper) (CPU/int8). Works in browsers, terminals, VS Code, and any other app.

---

## Install

### Option 1 — One-line installer (recommended)

```bash
bash <(curl -fsSL https://raw.githubusercontent.com/novafabric/novavoice/main/install.sh)
```

Installs system dependencies, sets up auto-start on login, and guides you through the one-time setup.

---

### Option 2 — pipx

```bash
# System dependencies
sudo apt install libportaudio2 xdotool xclip pipx

# Keyboard access (requires logout)
sudo usermod -aG input $USER
logout

# Install
pipx install novavoice
pipx ensurepath

# Auto-start on login
mkdir -p ~/.config/systemd/user
curl -fsSL https://raw.githubusercontent.com/novafabric/novavoice/main/contrib/novavoice.service \
  -o ~/.config/systemd/user/novavoice.service
systemctl --user enable --now novavoice.service
```

---

### Option 3 — .deb package

Download the latest `.deb` from [Releases](https://github.com/novafabric/novavoice/releases), then:

```bash
sudo apt install ./novavoice_*.deb

# Keyboard access (requires logout)
sudo usermod -aG input $USER
logout

# Auto-start on login
systemctl --user enable --now novavoice.service
```

---

## Usage

Once running, NovaVoice works silently in the background.

| Action | Result |
|--------|--------|
| Hold Space (0.5s+), speak, release | Text injected into focused app |
| `novavoice status` | Check if daemon is running |
| `novavoice stop` | Stop the daemon |
| `novavoice start` | Start the daemon |
| `novavoice doctor` | Check all prerequisites |
| `novavoice inject "hello"` | Test injection without recording |

---

## Configuration

Copy the example config and customize:

```bash
mkdir -p ~/.config/novavoice
cp examples/config.example.toml ~/.config/novavoice/config.toml
```

Key settings:

```toml
[stt]
model = "tiny.en"   # faster; try "base.en" for better accuracy

[hotkey]
hold_threshold_ms = 500   # how long to hold Space before recording starts

[audio]
max_record_seconds = 90
```

---

## System requirements

| Requirement | Notes |
|---|---|
| Ubuntu 22.04+ (or any Linux with systemd) | X11 or Wayland |
| Python 3.11+ | |
| `libportaudio2` | `sudo apt install libportaudio2` |
| `xdotool` (X11) or `ydotool`/`wtype` (Wayland) | For text injection |
| User in `input` group | `sudo usermod -aG input $USER` then re-login |

Run `novavoice doctor` to check everything at once.

---

## Troubleshooting

**evdev access fails**
```bash
sudo usermod -aG input $USER
# Log out and back in (required)
```

**Nothing happens when holding Space**
```bash
novavoice status    # is it running?
novavoice doctor    # check all prerequisites
journalctl --user -u novavoice.service -f   # view daemon logs
```

**Poor transcription quality**
Set `model = "base.en"` in `~/.config/novavoice/config.toml`. Slower but more accurate.

**Wayland injection not working**
Install `ydotool` and ensure `ydotoold` is running:
```bash
sudo apt install ydotool
sudo ydotoold &
```

---

## License

Apache 2.0 — see [LICENSE](LICENSE).
