Generate speech-to-text audio files from documents using the OpenAI API.
Build a simple application that:
- File selection — pick input files (PDF, text, etc.) via a file selector
- Text extraction — process and prepare the file content for text-to-speech
- Text-to-speech — send extracted text to an API (OpenAI first) and receive audio output
- Iterative improvement — refine the pipeline over time
Phase 1 — Project scaffolding & API integration. The foundation is in place:
- OpenAI SDK installed and ready for text-to-speech API calls
- Development tooling configured (ruff, mypy, pytest, poe)
- Basic test infrastructure exists
Requires Python 3.11+ and uv.
# Install dependencies
uv sync
# Update lockfile after any dependency changes
uv lockAll tasks are managed via Poe the Poet.
| Command | Description |
|---|---|
uv run poe dev |
Run everything — format, test, lint |
uv run poe dev-format |
Run ruff linter and formatter |
uv run poe dev-test |
Run pytest |
uv run poe dev-lint |
Run mypy type checks |
# Lint and format
uv run ruff check .
uv run ruff format .
# Type check
uv run mypy .
# Test
uv run pytest.
├── main.py # Entry point
├── pyproject.toml # Project config, deps, tool settings, Poe tasks
├── uv.lock # Locked dependency graph
└── tests/
└── test_main.py # Smoke test
| Category | Tool |
|---|---|
| Language | Python 3.11+ |
| Package manager | uv |
| API client | OpenAI SDK |
| Linter / formatter | ruff |
| Type checker | mypy |
| Testing | pytest |
| Task runner | poethepoet |