Skip to main content

Standalone chunked TTS voiceover + Whisper timing CLI

Project description

Voiceover Pipeline

Standalone CLI для генерации озвучки + Whisper timing из Markdown-сценариев.

Три TTS-провайдера: Polza GPT Audio, OpenRouter Gemini, Qwen3-TTS (GPU). Whisper CPU small — точные тайминги для Remotion-анимаций и субтитров. Agent-grade JSON-контракт: --json, semantic exit codes, manifest.json.

Install / Run

Run without installing (Python 3.11+, uv):

uvx voiceover-pipeline doctor

With Whisper timings:

uvx --from "voiceover-pipeline[timing-whisper]" voiceover-pipeline generate --with-timings ...

Local dev:

git clone https://github.com/VladimirMonin/voiceover-pipeline
cd voiceover-pipeline
uv sync --group dev --group timing-whisper
uv run voiceover doctor

API Keys

Create .env in your working directory:

POLZA_API_KEY=pza_...
OPENROUTER_API_KEY=sk-or-v1-...

Never commit .env.

Golden Command

uv run voiceover generate `
  --provider polza-chat-audio `
  --model "openai/gpt-audio-mini" `
  --script "in\script.md" `
  --run-id "prod" `
  --with-timings `
  --word-timestamps `
  --json `
  --overwrite

Результат (JSON stdout):

{"status": "success", "provider": "polza-chat-audio", "run_id": "prod",
 "duration_ms": 25520, "segment_count": 8, "cost": {"total": 0.0146, "currency": "RUB"}}

Что на выходе

out/<run-id>/
├── manifest.json                          ← entry-point для агентов
├── <run-id>-voiceover-<model>.mp3         ← полный MP3
├── <run-id>-voiceover-<model>.json        ← run-манифест
├── <run-id>.timings.json                  ← Whisper-сегменты (ms)
├── <run-id>.srt                           ← субтитры SRT
└── chunks/
    ├── chunk_01.mp3 ... chunk_NN.mp3
    └── chunks.json

Команды

Команда Зачем
doctor Проверить окружение
validate --script X Проверить сценарий
list providers/voices/timing-models Доступные модели
split --script X Чанки сценария
generate Полная генерация + тайминги
timings --audio X Тайминги из готового MP3

Все команды поддерживают --json.

Модели и цены

Провайдер Модель Цена минуты
Qwen3-TTS CustomVoice (preset/clone) Бесплатно (GPU)
Polza openai/gpt-audio-mini ~0.71 ₽
Polza openai/gpt-audio ~7.63 ₽
OpenRouter google/gemini-3.1-flash-tts-preview ~$0.03

Тестирование

uv sync --group dev --group timing-whisper
uv run --group dev pytest

45 тестов: JSON-контракт, exit codes, валидация, output policy.

Legal / Provider Notes

This project is an independent CLI wrapper around third-party providers. It is not affiliated with OpenAI, Google, OpenRouter, Polza.ai, Qwen, or CTranslate2 / faster-whisper. Provider names and model names are used solely for integration and documentation purposes. Generated audio usage is subject to the selected provider's terms of service. Do not upload private voice samples or generated speech without permission.

License

MIT. See LICENSE.

Документация

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voiceover_pipeline-0.3.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

voiceover_pipeline-0.3.0-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file voiceover_pipeline-0.3.0.tar.gz.

File metadata

  • Download URL: voiceover_pipeline-0.3.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for voiceover_pipeline-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c6164167d6be605dfd886af85db2d739e3e1b5902cc7d885bb92bf8fc7ddf3a3
MD5 16138412781905d33f8e242d1c9379f8
BLAKE2b-256 f63d273096957234eba2c9ed2c77441c6d711708dfe5794278540c8d662df9df

See more details on using hashes here.

File details

Details for the file voiceover_pipeline-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: voiceover_pipeline-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 27.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for voiceover_pipeline-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6abfd2e1b6e50643456a3a9d75031c50c740cde2929c6837e96dc90c7a71adbf
MD5 8b63c703d195222f72cd6cb0d1a5db23
BLAKE2b-256 84accb24f89d66f67e113a779a810f1920a5dbc712e3aa9363fdb040681e796b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page