- Зачем: - ускорение транскрипции на x86 CPU (Intel/AMD) в 2-4 раза через OpenVINO GenAI. - Что: - создан backends/openvino.py: OpenVINOBackend с ensure_model_available, create_model, transcribe. - модели скачиваются из HuggingFace (OpenVINO/whisper-*-ov), формат OpenVINO IR. - аудио декодируется через faster_whisper.decode_audio (PyAV) → .tolist() → pipe.generate(return_timestamps=True). - контракт compute_type: явный --compute-type уважается; из дефолтов large-v3 получает fp16 автоматически. - openvino-genai добавлен в pyproject.toml с platform markers (x86_64/AMD64, не macOS). - compute_type_explicit прокинут через get_backend → load_model → CLI. - 16 тестов для OpenVINO бэкенда: resolve_repo, ensure, create, transcribe, validate. - Проверка: - uv run pytest -v — 119 passed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
34 lines
830 B
TOML
34 lines
830 B
TOML
[project]
|
|
name = "local-transcriber"
|
|
version = "0.1.0"
|
|
description = "Local CLI tool for audio/video transcription using faster-whisper"
|
|
license = "MIT"
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"typer",
|
|
"rich",
|
|
"faster-whisper>=1.2.1",
|
|
"socksio>=1.0.0",
|
|
"nvidia-cublas-cu12>=12.4; sys_platform == 'linux' and platform_machine == 'x86_64'",
|
|
"openvino-genai>=2025.0; sys_platform != 'darwin' and (platform_machine == 'x86_64' or platform_machine == 'AMD64')",
|
|
"tomli>=2.0; python_version < '3.11'",
|
|
]
|
|
|
|
[project.scripts]
|
|
transcribe = "local_transcriber.cli:app"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/local_transcriber"]
|