- STTBackend Protocol + STTResult/STTSegment frozen dataclasses (base.py)
- MockSTTBackend for CI/tests (no GPU needed, CF_STT_MOCK=1)
- FasterWhisperBackend: loads model once, thread-safe, VRAM estimate by model size
- app.py: FastAPI service runnable as managed process by cf-orch
POST /transcribe (multipart audio) → STTTranscribeResponse-compatible JSON
GET /health → {status, model, vram_mb}
- __init__.py: process-level singleton + transcribe() convenience fn
- pyproject.toml: stt-faster-whisper + stt-service optional dep groups
61 lines
1.2 KiB
TOML
61 lines
1.2 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "circuitforge-core"
|
|
version = "0.8.0"
|
|
description = "Shared scaffold for CircuitForge products (MIT)"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"pyyaml>=6.0",
|
|
"requests>=2.31",
|
|
"openai>=1.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
manage = [
|
|
"platformdirs>=4.0",
|
|
"typer[all]>=0.12",
|
|
]
|
|
text-llamacpp = [
|
|
"llama-cpp-python>=0.2.0",
|
|
]
|
|
text-transformers = [
|
|
"torch>=2.0",
|
|
"transformers>=4.40",
|
|
"accelerate>=0.27",
|
|
]
|
|
text-transformers-4bit = [
|
|
"circuitforge-core[text-transformers]",
|
|
"bitsandbytes>=0.43",
|
|
]
|
|
stt-faster-whisper = [
|
|
"faster-whisper>=1.0",
|
|
]
|
|
stt-service = [
|
|
"circuitforge-core[stt-faster-whisper]",
|
|
"fastapi>=0.110",
|
|
"uvicorn[standard]>=0.29",
|
|
"python-multipart>=0.0.9",
|
|
]
|
|
dev = [
|
|
"circuitforge-core[manage]",
|
|
"pytest>=8.0",
|
|
"pytest-asyncio>=0.23",
|
|
"fastapi>=0.110",
|
|
"httpx>=0.27",
|
|
"ruff>=0.4",
|
|
"mypy>=1.10",
|
|
]
|
|
|
|
[project.scripts]
|
|
cf-manage = "circuitforge_core.manage.cli:app"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["."]
|
|
include = ["circuitforge_core*"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
asyncio_mode = "auto"
|