A browser-based dictation engine for workstation or phone
Project description
great-dictator
A browser-based dictation engine for workstation or phone.
In early (alpha) development, but already usable and fun!
Features
- Browser-based audio recording using MediaRecorder API
- Speech-to-text transcription using faster-whisper
- Simple web interface with Record/Stop controls
- File menu for managing transcriptions (Copy, Save, Save As)
- Hexagonal architecture for clean separation of concerns
Architecture
┌─────────────────────────────────────────────────────────────┐
│ Inbound Adapter │
│ (FastAPI + HTML/JS) │
└──────────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Domain Layer │
│ TranscriptionService ←── TranscriberPort (ABC) │
└──────────────────────────┬──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Outbound Adapter │
│ (WhisperTranscriber) │
└─────────────────────────────────────────────────────────────┘
Installation
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
pip install -e .
Running the Application
source venv/bin/activate
./scripts/dev-server.sh
Or manually:
uvicorn great_dictator.app:app --reload --port 8765
Then open http://localhost:8765 in your browser.
Note: Dev server uses port 8765, E2E tests use port 8766 to avoid conflicts.
Development
# Install test dependencies
pip install -r requirements-test.txt
# Install Playwright browsers
playwright install chromium
# Run all tests
pytest
# Run specific test suites
pytest tests/unit/ # Unit tests
pytest tests/integration/ # Integration tests
pytest tests/e2e/ # End-to-end tests
# Type checking
pyright src/
Project Structure
src/great_dictator/
├── app.py # Composition root
├── domain/
│ └── transcription.py # Domain layer (ports & services)
├── adapters/
│ ├── inbound/
│ │ └── fastapi_app.py # FastAPI routes
│ └── outbound/
│ └── whisper_transcriber.py # Whisper implementation
└── static/
└── index.html # Web UI
tests/
├── unit/ # Domain layer tests
├── integration/ # Adapter tests
└── e2e/
├── conftest.py # Server fixtures (port 8766)
└── test_dictation_flow.py # Playwright browser tests
scripts/
└── dev-server.sh # Dev server launcher (port 8765)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file great_dictator-0.1.0.tar.gz.
File metadata
- Download URL: great_dictator-0.1.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14081c7bacd67965af507033b6340a688e7c843664cd64d936c23da772ddc7d4
|
|
| MD5 |
b720e001f9a8cf44221a29b5f4a7189e
|
|
| BLAKE2b-256 |
7b3fcd8733eed7dfd87279940bf8e7c0dee45531b97eb28180f90cb8fd385a27
|
File details
Details for the file great_dictator-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: great_dictator-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4c9f0dbd0a1e0c434b36a285139701d4e96b16fbfa3cd2071feffb05829fc0f
|
|
| MD5 |
7067ddc0ed7a5bf3ca9390225a23e69a
|
|
| BLAKE2b-256 |
0ed52b527de9783a138e99ebc11217821c844ace576a809d4f9c30b9a441f28e
|