Communitygithub.com

Zuhair-01/claude-skills-and-systems

Doubao TTSで中国語・多言語ナレーションを生成します。中国語のボイスオーバー作成時や、ユーザーがDoubao/Volcengine/火山引擎/豆包 TTSを希望する場合、または字幕用の文字単位タイムスタンプメタデータが必要な場合に使用します。

claude-skills-and-systems とは?

このスキルは、Volcengine Doubao Speech 2.0 API を使用して、中国語(標準語)および多言語のナレーションを生成するための TTS(テキスト読み上げ)機能を提供します。開発者は、`DOUBAO_SPEECH_API_KEY` 環境変数で認証し、`voice_id` パラメータで話者を指定することで、高品質な音声を生成できます。非同期エンドポイント(`submit`/`query`)を利用すると、`audio_url` と共に単語レベルのタイムスタンプ(`sentences[].words[]`)を取得でき、動画字幕や正確なタイミング制御に活用できます。このスキルは、`tools/audio/tts_selector.py` や `tools/audio/doubao_tts.py` を通じて呼び出せ、サンプル音声の試聴から本番ナレーション生成までの推奨ワークフローを備えています。特に中国語の解説動画や多言語コンテンツ制作において、自然な発話リズムと正確な字幕タイミングを実現します。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Zuhair-01/claude-skills-and-systems/tree/HEAD/skills/doubao-tts

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Doubao TTS

.env に DOUBAO_SPEECH_API_KEY が必要です。 デフォルトの話者を設定するには DOUBAO_SPEECH_VOICE_TYPE を設定するか、ツールに voice_id を渡してください。

現在のAPI

新しいコンソールのAPIキーフローを使用します:

X-Api-Key: ${DOUBAO_SPEECH_API_KEY}
X-Api-Resource-Id: seed-tts-2.0

新しいコンソールのAPIキーでは X-Api-App-Id や X-Api-Access-Key を使用しないでください。APIが load grant: requested grant not found を返す場合、キータイプまたは認証ヘッダーが間違っている可能性があります。

長尺動画のナレーションには、非同期エンドポイントを推奨します:

POST https://openspeech.bytedance.com/api/v3/tts/submit
POST https://openspeech.bytedance.com/api/v3/tts/query

これにより audio_url と、字幕作成に使用できる sentences[].words[] タイミングメタデータが返されます。

OpenMontageでの使用

TTSセレクターで生成:

from tools.audio.tts_selector import TTSSelector

result = TTSSelector().execute({
    "preferred_provider": "doubao",
    "text": "如果 AI 真的会改变未来,普通人到底该怎么参与?",
    "voice_id": "zh_female_vv_uranus_bigtts",
    "output_path": "projects/my-video/assets/audio/narration.mp3",
    "speech_rate": 0,
    "enable_timestamp": True,
})

またはプロバイダーを直接呼び出し:

from tools.audio.doubao_tts import DoubaoTTS

result = DoubaoTTS().execute({
    "text": "短样本试听文本。",
    "voice_id": "zh_female_vv_uranus_bigtts",
    "output_path": "projects/my-video/assets/audio/doubao_sample.mp3",
})

プロバイダーは以下を書き出します:

  • output_path: ダウンロードされた音声ファイル
  • metadata_path: 完全なクエリ応答JSON。デフォルトでは <output_path>.json

推奨ワークフロー

  1. 本番ナレーションの前に、10〜15秒のサンプルを生成します。
  2. ユーザーに音声の自然さ、アクセント、スピードを承認してもらいます。
  3. 承認後、完全なナレーションを生成します。
  4. クエリJSONを保持します。これは字幕タイミングの信頼できるソースです。
  5. 推定テキスト長ではなく、sentences[].words[] からキャプションを構築します。
  6. タイムスタンプを適用する前に、中国語の意味的な句でキャプションをグループ化します。固定文字数でのみ分割しないでください。「在不押单个公司的情况下」や「可能会被慢慢稀释」のようなフレーズが分割され、理解を損なう可能性があります。
  7. ユーザーが既存の実行時間に合わせるよう明示的に要求しない限り、動画の長さは承認された音声リズムに従わせます。

パラメーター

  • voice_id: Doubaoの speaker / 音声タイプ。デフォルトは DOUBAO_SPEECH_VOICE_TYPE。
  • resource_id: Doubao Speech 2.0音声には seed-tts-2.0 を使用。
  • speech_rate: 0 は標準、100 は2倍、-50 は0.5倍。
  • sample_rate: デフォルト 24000。
  • enable_timestamp: デフォルト true。
  • return_usage: デフォルト true。利用可能な場合に使用量メタデータを要求します。

デフォルトでは additions.explicit_language を渡さないでください。一部のエンドポイント/キーの組み合わせは zh-cn を拒否し unsupported additions explicit language zh-cn を返します。

落ち着いた中国語の解説動画では、speech_rate: 0 から始めてください。結果が承認された形式に対して長すぎる場合は、speech_rate: 25 または 50 で短い比較サンプルを作成してから、完全なナレーションを再生成します。ユーザーがDoubaoの自然なペースを好む場合、以前のプロバイダーの時間に合わせるために音声を高速化しないでください。

トラブルシューティング

  • load grant: requested grant not found: キータイプまたは認証ヘッダーが間違っています。新しいコンソールのAPIキーには X-Api-Key を使用してください。
  • speaker permission denied: 音声IDが間違っているか、選択したリソースに対して許可されていません。
  • quota exceeded: クォータ、ライフタイム文字数、または同時実行数を超えました。
  • タイムスタンプがない場合: enable_timestamp: true を確認し、クエリJSONを保持し、選択したエンドポイントが sentences を返したことを確認してください。

安全性

APIキーをログ、メタデータ、パッチ、またはプロジェクトの成果物に印刷または書き込まないでください。.env.example には空の変数名のみを含める必要があります。

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

Zuhair-01/claude-skills-and-systems

Create AI avatar videos with precise control over avatars, voices, scripts, scenes, and backgrounds using HeyGen's v2 API. Use when: (1) Choosing a specific avatar and voice for a video, (2) Writing exact scripts for an avatar to speak, (3) Building multi-scene videos with different backgrounds per scene, (4) Creating transparent WebM videos for compositing, (5) Using talking photos as video presenters, (6) Integrating HeyGen avatars with Remotion, (7) Batch video generation with exact specs, (8) Brand-consistent production videos with precise control.

Zuhair-01/claude-skills-and-systems

Edit existing videos using AI — remix style, upscale, remove background, and add audio via fal.ai's hosted video models.

Zuhair-01/claude-skills-and-systems

Video and audio processing with FFmpeg. Use for format conversion, resizing, compression, audio extraction, and preparing assets for Remotion. Triggers include converting GIF to MP4, resizing video, extracting audio, compressing files, or any media transformation task.

Zuhair-01/claude-skills-and-systems

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated motion-first unit, including an animated title. Route fresh creation through hyperframes before using this skill.

Zuhair-01/claude-skills-and-systems

Read-only queue dashboard for workspace-aware ship. (gstack)

Zuhair-01/claude-skills-and-systems

Generate HeyGen presenter videos via the v3 Video Agent pipeline — handles Frame Check (aspect ratio correction), prompt engineering, avatar resolution, and voice selection. Required for any HeyGen video generation. Replaces deprecated endpoints with v3. Use when: (1) generating any HeyGen video (via API or otherwise), (2) sending a personalized video message (outreach, update, announcement, pitch, knowledge), (3) creating a HeyGen presenter-led explainer, tutorial, or product demo with a human face, (4) "make a video of me saying...", "send a video to my leads", "record an update for my team", "create a video pitch", "make a loom-style message", "I want to appear in this video", "generate a HeyGen video", "make a talking head video". Accepts avatar_id from heygen-avatar for identity-first HeyGen videos, or uses a stock presenter. Returns video share URL + HeyGen session URL for iteration. Chain signal: when the user wants to create/design an avatar AND make a video in the same request, run heygen-avatar f...

Zuhair-01/claude-skills-and-systems

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

Zuhair-01/claude-skills-and-systems

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Zuhair-01/claude-skills-and-systems

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO.

関連スキル