$npx -y skills add shang-zhu/violin --skill video-translatorDub a video into another language and generate subtitles using the default Together + Cartesia stack. Trigger when the user wants to translate / dub / voice-over a video file, or generate subtitles for it. Handles .mp4 / .mkv / .webm. Installs as the violin CLI (and `viol
| 1 | # Violin — operating skill |
| 2 | |
| 3 | Always uses the default config (Together for translation, `cartesia/sonic-3` for TTS). If the user asks for OpenAI, ElevenLabs, or custom configs, **stop and point them to the Violin repo** — those flows aren't supported through the global CLI. |
| 4 | |
| 5 | ## Pre-flight |
| 6 | |
| 7 | Run these silently first. Abort if any fails: |
| 8 | |
| 9 | ```bash |
| 10 | command -v violin # 1. CLI on PATH |
| 11 | test -f "<input>" # 2. Input exists |
| 12 | printenv TOGETHER_API_KEY # 3. Key available |
| 13 | ``` |
| 14 | |
| 15 | If `violin` is missing: tell the user to `uv tool install violin`, then `violin --install-skill` to refresh this skill file. Do not auto-install. |
| 16 | |
| 17 | If `TOGETHER_API_KEY` is missing: |
| 18 | - Inside the Violin repo → populate `.env` (auto-loaded) |
| 19 | - Elsewhere → `export TOGETHER_API_KEY=...` in `~/.zshrc` / `~/.bashrc`, then `source` it |
| 20 | |
| 21 | ## Decisions |
| 22 | |
| 23 | - **CLI vs API**: single run-and-wait file → CLI (`violin`). Multi-job / HTTP / web UI → API server (`violin-api`); print the command, don't auto-start it. |
| 24 | - **Style** (`--style`): default `standard`. Kids content → `kids`, formal/lecture → `academic`, casual → `casual`, dramatic → `storyteller`, news → `news`. Run `violin --style list` if unsure. |
| 25 | - **Voiceover**: keep default (mix dubbed audio over a quiet original). Use `--no-voiceover` only when the user explicitly says "replace audio entirely". |
| 26 | |
| 27 | ## Run |
| 28 | |
| 29 | ```bash |
| 30 | violin <input> <output> --language <Lang> [flags] |
| 31 | ``` |
| 32 | |
| 33 | ## Flags |
| 34 | |
| 35 | | Flag | Default | When to set | |
| 36 | |------|---------|-------------| |
| 37 | | `--language` / `-l` | *required* | Target language (e.g. `Chinese`, `Spanish`, `Japanese`). | |
| 38 | | `--voice` / `-v` | auto (native voice picked by `preferences.voice_gender`) | Only when the user names a specific voice from the catalog (e.g. `"warm female narrator"`). Otherwise omit and let the default kick in. | |
| 39 | | `--source-language` | `auto-detect` | Only if Whisper mis-detects the source language. | |
| 40 | | `--style` / `-s` | `standard` | See Decisions above. | |
| 41 | | `--no-subtitles` | off | User says "no SRT" / "video only". | |
| 42 | | `--no-voiceover` | off | User says "replace original audio entirely". | |
| 43 | | `--config` / `-c` | `config/default.yaml` | Don't use through this skill — repo-only flow. | |
| 44 | | `--timings-out` | off | Only when the user wants a per-step timing JSON for debugging / benchmarking. | |
| 45 | |
| 46 | ## Language coverage |
| 47 | |
| 48 | 33 target languages total. **16** ship with handpicked native-speaker voices: Chinese, Spanish, English, Hindi, Arabic, Portuguese, Russian, Japanese, Turkish, German, Korean, French, Italian, Polish, Dutch, Swedish. The other **17** fall back to the English voice catalog (multilingual under Cartesia Sonic 3) — quality is decent but the voice isn't a native speaker. Mention this caveat only if the user is translating to a fallback language and asks about voice quality. |
| 49 | |
| 50 | ## Report back |
| 51 | |
| 52 | - Output video path + SRT path (printed by the run). |
| 53 | - Total cost (printed at end — surface, don't hide). |
| 54 | - If voiceover was on, mention the `_original.m4a` sidecar. |
| 55 | |
| 56 | ## Don'ts |
| 57 | |
| 58 | - Don't run on multi-GB videos without first quoting the rough cost (audio length × per-provider rates in `pipeline/pricing.py`). |
| 59 | - Don't fabricate a "subtitles-only" mode — the CLI requires the full pipeline. If the user only wants SRT, run the full pipeline and hand them just the `.srt`, warning them of the cost first. |
| 60 | - Don't try to switch to OpenAI or ElevenLabs from this skill. Point the user to the repo + `--config config/other_api.yaml` (or their own override). |
| 61 | - Don't paraphrase the README. For supported languages (33), voice catalog, and full flag docs, point them at `README.md` or `violin --help`. |