Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
42209df
build: replace v0 layout with a uv-managed package
Yalhash Oct 28, 2026
90f53be
feat(core): domain model, ports, events, segmenter and pipeline
Yalhash Oct 28, 2026
1c5b03e
feat(adapters): audio sources, VAD, Whisper, providers, platform shield
Yalhash Oct 28, 2026
2e27cf2
feat(app): config, wiring, controller, presenter and Qt UI
Yalhash Oct 28, 2026
e191000
test: unit, pipeline, adapter, UI and real-model suites
Yalhash Oct 28, 2026
eb7d735
chore(ci): update uv.lock and apply ruff fixes
github-actions[bot] Oct 28, 2026
b04604c
docs: v1 architecture document and diagrams; keep v0 diagram for refe…
Yalhash Oct 28, 2026
3916b99
ci: fix lint findings, run type check and tests even when lint fails
Yalhash Oct 28, 2026
52ba00b
fix(core): exact idle/drain accounting; stop() applies the last trans…
Yalhash Oct 28, 2026
f98885e
fix: Silero interface detection, mypy findings, shield diagnostics
Yalhash Oct 28, 2026
da321af
chore(ci): update uv.lock and apply ruff fixes
github-actions[bot] Oct 28, 2026
7f6092b
ci: native Qt on Windows to test the real shield; pydantic mypy plugi…
Yalhash Oct 28, 2026
4a404d9
fix(app): deterministic Qt teardown; CI reports the real Windows shie…
Yalhash Oct 28, 2026
e93520e
chore(ci): update uv.lock and apply ruff fixes
github-actions[bot] Oct 28, 2026
eadcc7a
fix(core): lifecycle bugs found by independent review
Yalhash Oct 28, 2026
054ed7b
chore(ci): update uv.lock and apply ruff fixes
github-actions[bot] Oct 28, 2026
15162ac
fix: second review pass on config, rebuild, clearing and adapters
Yalhash Oct 28, 2026
1c5cb57
chore(ci): update uv.lock and apply ruff fixes
github-actions[bot] Oct 28, 2026
761159b
fix(config): explicit type for parsed TOML (mypy on Python 3.11+)
Yalhash Oct 28, 2026
6d8440a
fix(ui): shield filter errors on click, shutdown crash; Whisper compu…
Yalhash Oct 28, 2026
fefcce3
chore(ci): update uv.lock and apply ruff fixes
github-actions[bot] Oct 28, 2026
3098ca9
fix(ui): read the native handle via WA_WState_Created + windowHandle()
Yalhash Oct 28, 2026
619e35a
fix(ui): never touch a window from WinIdChange; keep no widget refere…
Yalhash Oct 28, 2026
a6eee68
feat(settings): model dropdowns for translation and suggestions
Yalhash Oct 28, 2026
9f79b04
chore(ci): update uv.lock and apply ruff fixes
github-actions[bot] Oct 28, 2026
a96b53f
style: drop a misplaced fmt: skip comment (RUF028)
Yalhash Oct 28, 2026
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
28 changes: 0 additions & 28 deletions .env.example

This file was deleted.

140 changes: 140 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
# Keeps uv.lock in sync with pyproject.toml. On feature branches it also applies
# ruff's safe autofixes and formatting, and commits them; on main it only checks.
housekeeping:
name: Lockfile and formatting
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
sha: ${{ steps.commit.outputs.sha }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
- uses: astral-sh/setup-uv@v6
- name: Resolve dependencies
run: uv lock
- name: Autofix (feature branches only)
if: github.event_name == 'push' && github.ref != 'refs/heads/main'
run: |
uvx ruff@0.14.0 check --fix --exit-zero .
uvx ruff@0.14.0 format .
- name: Commit changes
id: commit
shell: bash
run: |
if [ -n "$(git status --porcelain)" ]; then
if [ "${{ github.event_name }}" != "push" ]; then
git status --porcelain
echo "::error title=Out of date::uv.lock or formatting is out of date; run 'uv lock' and 'ruff format'"
exit 1
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "chore(ci): update uv.lock and apply ruff fixes"
git push
fi
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"

test:
name: Test (${{ matrix.os }}, py${{ matrix.python }})
needs: housekeeping
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: ["3.10", "3.12"]
runs-on: ${{ matrix.os }}
env:
# Native windows on Windows so the real capture-shield API is exercised.
QT_QPA_PLATFORM: ${{ matrix.os == 'windows-latest' && 'windows' || 'offscreen' }}
PYTHONUTF8: "1"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.housekeeping.outputs.sha }}
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python }}
- name: System libraries (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libegl1 libgl1 libxkbcommon0 \
libxkbcommon-x11-0 libfontconfig1 libdbus-1-3 libportaudio2
- name: Install (locked)
id: install
run: uv sync --locked
- name: Lint
shell: bash
run: uv run ruff check --output-format=concise . | uv run python scripts/ci_annotate.py lines ruff
- name: Type check
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
shell: bash
run: uv run mypy | uv run python scripts/ci_annotate.py lines mypy
- name: Tests
id: tests
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
shell: bash
run: uv run pytest -q --junitxml=junit.xml --cov=polyglot --cov-report=term-missing:skip-covered
- name: Real capture shield on Windows
if: ${{ runner.os == 'Windows' && !cancelled() && steps.install.outcome == 'success' }}
shell: bash
run: uv run python scripts/shield_check.py
- name: Annotate test failures
if: failure()
shell: bash
run: test -f junit.xml && uv run python scripts/ci_annotate.py junit junit.xml || true
- name: Diagnose a crashed test run
if: ${{ failure() && steps.tests.outcome == 'failure' }}
shell: bash
run: |
uv run pytest -v -p no:cacheprovider -o addopts="" -m "not slow" 2>&1 \
| uv run python scripts/ci_annotate.py tail "crashed test run (last lines)" || true

models:
name: Real models (Whisper tiny, Silero)
needs: housekeeping
runs-on: ubuntu-latest
env:
QT_QPA_PLATFORM: offscreen
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.housekeeping.outputs.sha }}
- uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
- name: System libraries
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends espeak-ng libportaudio2 libegl1 \
libgl1 libxkbcommon0 libfontconfig1 libdbus-1-3
- uses: actions/cache@v4
with:
path: ~/.cache/huggingface
key: hf-whisper-tiny
- run: uv sync --locked
- name: Slow tests
shell: bash
run: uv run pytest -m slow -q --junitxml=junit.xml
- name: Annotate test failures
if: failure()
shell: bash
run: test -f junit.xml && uv run python scripts/ci_annotate.py junit junit.xml || true
82 changes: 34 additions & 48 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,48 +1,34 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Virtual Environment
venv/
env/
ENV/
.venv

# Environment variables
.env
.env.local

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Application specific
.polyglot/
*.log
dumps/

# Python
__pycache__/
*.py[cod]
*.egg-info/
build/
dist/
.venv/
venv/

# Tooling caches
.pytest_cache/
.mypy_cache/
.ruff_cache/
.coverage
coverage.xml
junit*.xml
htmlcov/

# Secrets and local config (v1 keeps keys in the OS keyring; never commit these)
.env
.env.*
config.toml

# Recorded audio (v0 dumps, local test recordings)
dumps/
*.wav
!tests/fixtures/**/*.wav

# Editors / OS
.vscode/
.idea/
.cursor/
.DS_Store
Thumbs.db
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Yousef Alhashemi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading