Skip to content
Merged
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
17 changes: 4 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,25 @@ jobs:
- name: Install test tools
run: python -m pip install --upgrade pytest ruff
- name: Compile source
run: python -m compileall -q voice2text voice2text_ai.py qt_app.py
run: python -m compileall -q voice2text voice2text_ai.py
- name: Lint
run: ruff check voice2text tests voice2text_ai.py qt_app.py
run: ruff check voice2text tests voice2text_ai.py
- name: Unit tests
run: python -m pytest -q

flatpak:
needs: test
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-50
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
options: --privileged
steps:
- uses: actions/checkout@v4
- name: Generate pinned Python sources
shell: bash
run: |
git clone --depth=1 https://github.com/flatpak/flatpak-builder-tools.git /tmp/flatpak-builder-tools
python3 /tmp/flatpak-builder-tools/pip/flatpak-pip-generator \
--requirements-file=packaging/flatpak/requirements.txt \

--runtime org.gnome.Sdk//50 \

--prefer-wheels=ctranslate2,onnxruntime,tokenizers,av,numpy,pyyaml,protobuf,hf-xet \

--wheel-arches=x86_64 \

--output=python3-requirements-flatpak
python3 /tmp/flatpak-builder-tools/pip/flatpak-pip-generator --requirements-file=packaging/flatpak/requirements.txt --runtime org.gnome.Sdk//48 --prefer-wheels=ctranslate2,onnxruntime,tokenizers,av,numpy,pyyaml,protobuf,aiohttp --wheel-arches=x86_64 --output=python3-requirements-flatpak
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: Voice2Text-AI.flatpak
Expand Down
105 changes: 96 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,99 @@
# Voice2Text AI microphone dropdown readability fix
# Voice2Text AI

This overlay updates the existing `release/v0.4.0-native-linux` branch.
Fast native Linux dictation with local AI. Record from your microphone, have
speech transcribed on-device with Faster Whisper, prompt a local Ollama model,
and hear the answer spoken back with a natural neural voice and an offline
eSpeak NG fallback.

Changes:
Built with GTK 4 and libadwaita, powered by GStreamer, and distributed as a
Flatpak. Works on Wayland and X11 with PipeWire or PulseAudio.

- Widens the Preferences dialog.
- Shows the complete selected microphone name as the row subtitle and tooltip.
- Uses a wider selected-value label with middle ellipsis only when unavoidable.
- Wraps every microphone source name in the dropdown list, so long PipeWire,
ALSA, USB, monitor, and hardware source names can be read in full.
- Does not alter dictation, rendering, TTS, Flatpak dependencies, or settings.
## Features

- **On-device dictation** — microphone audio is transcribed locally by Faster
Whisper (nothing leaves your machine).
- **Local AI prompts** — send the transcript to any Ollama model you have
pulled, with streaming responses.
- **Natural speech output** — Edge TTS voices stream immediately; if the
network voice is unavailable, eSpeak NG speaks offline automatically.
- **Adaptive segmentation** — speech is split at pauses, so dictation flows
naturally while transcribing in the background.
- **Coordinated appearance** — follows the system light/dark setting, with an
explicit override in Preferences.

## Install (Flatpak)

The easiest way is the Flatpak from the [releases](https://github.com/crhy/Voice2Text-AI/releases):

```bash
flatpak install --user Voice2Text-AI.flatpak
flatpak run io.github.crhy.voice2textai
```

For local AI, install [Ollama](https://ollama.com/) and pull a model, for example:

```bash
ollama pull llama3.1:8b
```

The Whisper model downloads on first launch (the `base` model is the default;
smaller models use less memory and start faster).

## Run from source

Requires Python 3.11+, GTK 4, libadwaita, and GStreamer with the Python
bindings. Install the Python dependencies and launch:

```bash
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/python voice2text_ai.py
```

`voice2text_ai.py` is a thin launcher over the `voice2text` package; the
PyPI entry point is `voice2text-ai`.

## Keyboard shortcuts

| Shortcut | Action |
| ------------------- | ----------------------------- |
| `Ctrl+R` | Start or stop dictation |
| `Ctrl+Enter` | Ask AI |
| `Ctrl+Shift+C` | Copy transcript |
| `Ctrl+L` | Clear |
| `Ctrl+,` | Preferences |
| `Ctrl+Q` | Quit |

## Building the Flatpak

The GitHub Actions workflow generates pinned Python dependencies, builds the
Flatpak bundle, and attaches it to a draft release for every `v*` tag. To build
locally, generate the pinned module and run flatpak-builder:

```bash
git clone https://github.com/flatpak/flatpak-builder-tools.git /tmp/flatpak-builder-tools
python3 /tmp/flatpak-builder-tools/pip/flatpak-pip-generator \
--requirements-file=packaging/flatpak/requirements.txt \
--runtime org.gnome.Sdk//48 \
--prefer-wheels=ctranslate2,onnxruntime,tokenizers,av,numpy,pyyaml,protobuf \
--wheel-arches=x86_64 \
--output=python3-requirements-flatpak
flatpak-builder --user --install --force-clean build-dir io.github.crhy.voice2textai.yml
```

## Configuration

Settings are stored in `$XDG_CONFIG_HOME/voice2text-ai/config.json` and edited
from the Preferences dialog.

## Acknowledgements

- [Faster Whisper](https://github.com/SYSTRAN/faster-whisper) for on-device transcription
- [Ollama](https://ollama.com/) for local language models
- [Edge TTS](https://github.com/rany2/edge-tts) for natural voices
- [eSpeak NG](https://github.com/espeak-ng/espeak-ng) for offline speech
- GTK 4, libadwaita, and GStreamer

## License

MIT — see [LICENSE](LICENSE).
6 changes: 0 additions & 6 deletions config.example.json

This file was deleted.

Binary file removed docs/screenshots/AIresponse.png
Binary file not shown.
Binary file removed docs/screenshots/mainwindow.png
Binary file not shown.
Binary file removed docs/screenshots/typicalquery.png
Binary file not shown.
2 changes: 1 addition & 1 deletion io.github.crhy.voice2textai.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</screenshots>
<content_rating type="oars-1.1" />
<releases>
<release version="0.4.0" date="2026-07-29">
<release version="0.4.0" date="2026-08-02">
<description>
<p>Rebuilt around GTK 4, libadwaita, and GStreamer with a modular, lower-overhead runtime.</p>
</description>
Expand Down
2 changes: 1 addition & 1 deletion io.github.crhy.voice2textai.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id: io.github.crhy.voice2textai
runtime: org.gnome.Platform
runtime-version: '50'
runtime-version: '48'
sdk: org.gnome.Sdk
command: voice2text-ai

Expand Down
Loading
Loading