chore: bootstrap repository structure for voice ptt app

This commit is contained in:
Ilgiz Kalmetyev 2026-04-08 19:50:57 +05:00
commit 1fc9a97961
23 changed files with 179 additions and 0 deletions

22
.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
__pycache__/
*.py[cod]
*.pyd
*.so
.pytest_cache/
.mypy_cache/
.ruff_cache/
.venv/
venv/
env/
build/
dist/
*.egg-info/
.coverage
htmlcov/
*.log
*.db-journal
*.sqlite-journal
Thumbs.db
Desktop.ini
.DS_Store

29
README.md Normal file
View File

@ -0,0 +1,29 @@
# Voice PTT
Windows desktop push-to-talk transcription app scaffold.
## Current state
The repository is bootstrapped and ready for incremental implementation.
The application entrypoint is `python -m app.main`.
## Layout
The codebase follows the planned architecture for:
- application bootstrap and state
- configuration and logging services
- audio capture and ASR services
- hotkey, injection, and history layers
- Windows-specific platform integration
- PyInstaller packaging
## Local setup
Use Python 3.11 on Windows.
```powershell
python -m pip install -r requirements.txt
python -m app.main
```

2
app/__init__.py Normal file
View File

@ -0,0 +1,2 @@
"""Application package."""

25
app/bootstrap.py Normal file
View File

@ -0,0 +1,25 @@
from __future__ import annotations
import sys
from PySide6.QtWidgets import QApplication
from ui.main_window import MainWindow
APP_NAME = "VoicePTT"
ORGANIZATION_NAME = "VoicePTT"
def build_application(argv: list[str] | None = None) -> QApplication:
app = QApplication(argv or sys.argv)
app.setApplicationName(APP_NAME)
app.setOrganizationName(ORGANIZATION_NAME)
return app
def main() -> int:
app = build_application()
window = MainWindow()
window.show()
return app.exec()

12
app/main.py Normal file
View File

@ -0,0 +1,12 @@
from __future__ import annotations
from app.bootstrap import main as bootstrap_main
def main() -> int:
return bootstrap_main()
if __name__ == "__main__":
raise SystemExit(main())

2
asr/__init__.py Normal file
View File

@ -0,0 +1,2 @@
"""Automatic speech recognition package."""

2
audio/__init__.py Normal file
View File

@ -0,0 +1,2 @@
"""Audio capture package."""

2
core/__init__.py Normal file
View File

@ -0,0 +1,2 @@
"""Core application services."""

2
history/__init__.py Normal file
View File

@ -0,0 +1,2 @@
"""History persistence package."""

2
hotkeys/__init__.py Normal file
View File

@ -0,0 +1,2 @@
"""Hotkey handling package."""

2
injection/__init__.py Normal file
View File

@ -0,0 +1,2 @@
"""Text injection package."""

2
logging_ext/__init__.py Normal file
View File

@ -0,0 +1,2 @@
"""Logging extensions package."""

View File

@ -0,0 +1 @@

2
platform/__init__.py Normal file
View File

@ -0,0 +1,2 @@
"""Windows platform integration package."""

View File

@ -0,0 +1,2 @@
"""Windows-specific integration helpers."""

41
pyproject.toml Normal file
View File

@ -0,0 +1,41 @@
[build-system]
requires = ["setuptools>=69", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "voice-ptt"
version = "0.1.0"
description = "Windows push-to-talk transcription app"
readme = "README.md"
requires-python = "==3.11.*"
dependencies = [
"PySide6>=6.7",
"faster-whisper>=1.1.0",
"ctranslate2>=4.4.0",
"sounddevice>=0.4.6",
"pywin32>=306; platform_system == 'Windows'",
"pyinstaller>=6.0",
]
[project.scripts]
voice-ptt = "app.main:main"
[tool.setuptools]
packages = [
"app",
"audio",
"asr",
"core",
"history",
"hotkeys",
"injection",
"logging_ext",
"platform",
"platform.windows",
"ui",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-q"

7
requirements.txt Normal file
View File

@ -0,0 +1,7 @@
PySide6>=6.7
faster-whisper>=1.1.0
ctranslate2>=4.4.0
sounddevice>=0.4.6
pywin32>=306; platform_system == "Windows"
pyinstaller>=6.0

1
resources/icons/.gitkeep Normal file
View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@

1
tests/manual/.gitkeep Normal file
View File

@ -0,0 +1 @@

1
tests/unit/.gitkeep Normal file
View File

@ -0,0 +1 @@

2
ui/__init__.py Normal file
View File

@ -0,0 +1,2 @@
"""User interface package."""

16
ui/main_window.py Normal file
View File

@ -0,0 +1,16 @@
from __future__ import annotations
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QLabel, QMainWindow
class MainWindow(QMainWindow):
def __init__(self) -> None:
super().__init__()
self.setWindowTitle("VoicePTT")
self.resize(960, 640)
label = QLabel("VoicePTT bootstrap scaffold")
label.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.setCentralWidget(label)