Audio Driven Story Gen logo

Audio Driven Story Gen

Community
JianhuiWei7
audio-driven-story-gen

音频驱动有声故事生成工具,根据输入的音频文件、参考文本和风格需求,生成和音频时长一致、内容匹配、卡点精准的有声故事,直接使用输入音频作为故事背景音乐/配音。当用户输入音频文件+参考风格/需求,要求生成有声故事、音频匹配视频/故事时调用本技能。

Overview

PublisherJianhuiWei7
RepositoryVideoWeaver
Skill nameaudio-driven-story-gen
Stars
48
Forks
1
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by JianhuiWei7 on GitHub. Read the source before you install it.

Installation

Install the Audio Driven Story Gen AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/JianhuiWei7/VideoWeaver/tree/main/FINAL_EXPERT_SKILLS/audio-driven-story-gen
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/JianhuiWei7/VideoWeaver.git /tmp/VideoWeaver
mkdir -p .claude/skills
cp -r /tmp/VideoWeaver/FINAL_EXPERT_SKILLS/audio-driven-story-gen .claude/skills/audio-driven-story-gen
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Audio Driven Story Gen in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Audio Driven Story Gen on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Audio Driven Story Gen is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

audio-driven-story-gen 有声故事生成技能

功能说明

本技能可根据用户提供的音频文件、风格参考文本和需求,自动生成与音频时长完全一致、内容和音频语义匹配、画面/剧情卡点精准的有声故事,直接复用输入音频作为故事的原声/背景音乐。

核心要求

  1. 时长对齐:生成的故事总时长必须和输入音频文件的时长完全一致
  2. 内容匹配:故事内容必须和音频的ASR识别结果/语义高度一致
  3. 卡点精准:剧情节点、场景切换必须和音频的语音节点、节奏点完全对齐
  4. 一致性:多次出现的人物、场景、物体等元素必须保持高度统一(为了保持一致性,在生成片段之前先生成一致性的参考图,然后可以在生成第二个片段时使用前一个片段的视频作为参考 或者使用一致性参考图来参考,来保持人物主体的一致性)
  5. 风格匹配:生成的故事风格必须符合用户提供的参考文本要求

工作流程

步骤1:预处理输入资源

  1. 使用automatic-speech-recognition技能识别输入音频的文本内容,获取完整的语音台词和时间戳
  2. 使用get-audio-metadata技能获取音频总时长、节奏点、关键时间戳
  3. 读取用户提供的参考文本、风格需求和其他约束条件

步骤2:剧情规划与参考图检验生成

  1. 根据ASR识别的文本内容和时间戳(必须选择输出更加简洁的.str格式),拆分故事的剧情节点,每个节点对应音频的一个时间片段。可以将不同剧情节点进行合并,不一定要全部都单独生成。生成越多的单独剧情,出现不一致的问题越大。但是单个剧情生成不能超过video-gen这个技能能支持的最长时长。
  2. 合并完剧情后, 为每个剧情节点匹配对应的场景、人物、动作、画面内容,确保和台词语义一致. 规划生成的剧情情节。将完整的剧情规划记录写入并且保存到 plan.json 文件中并且indent=4. 你要将文件保存到get-output-dir获取的输出文件夹中。 这个步骤必须做,不能跳过 注意点: 各个片段的内容不能有剧情上的重叠和重复,剧情要保证逻辑的连贯性。 例子:
json
[
  {
    "id": 1,
    "duration": 5.0,
    "prompt": "xxx[生成这一片段的内容]",
    "consistent_assets": ["xxx[这里填入这个片段所需要的一致性的图片,可以是是场景,人物,物体,背景,等等,这些元素如果要用的话,必须要提前生成好图片]"],
    "chosed_clips": ["xxx[第一个可以留空,因为没有前序片段]"],
    "merged_audios_segments": ["1","2[.srt文件中,哪几个片段可以合并在这里一起生成]", "3"]
  },
  {
    "id": 2,
    "duration": 4.0,
    "prompt": "",
    "consistent_assets": ["xxx"],
    "chosed_clips": ["xxx[选择哪一个前序片段作为参考输入来生成这一片段的视频,要选取最相关的视频片段,不能有冲突]"],
    "merged_audios_segments": ["xxx"] 
  }
]
  1. 调用 trim-audio 技能,将长音频按照你的plan.json来进行切割,切割成多个对应的音频片段,这些音频片段将在生成视频片段时必须作为参考音频传入
  2. 根据计划统一规划全局的人物设定、场景风格、视觉元素,确保所有节点的元素一致性。根据规划,将规划中的consistent_assets所列举的图使用image-gen技能,先生成一致性的参考图。在生成视频时,可以将参考图和上一段已经生成好的视频一起传入,作为参考资料来保持一致性。你可以从已经生成好的视频片段中,选取最合适的视频传入。

比如一个故事, 讲述的是一个男孩和女孩的故事,需要生成多个片段来拼接。那么男孩的形象和女孩的形象需要在不同片段里保持形象的一致,所以需要先生成这些形象,然后在各个片段中,如果出现了那个主体,那么就将它作为参考图传入,生成视频。简单来说:如多个片段出现了相同的人物、物体、背景,必须将该图片作为参考图传入多个片段生成中。因为要保持主体在多个片段中的一致性。

注意,在生成参考图的时候,必须强调并保持参考图之间的一致性:生成参考图的时候也需要保持参考图之间的一致性,否则会导致视频中出现不一致的情况。 具体来说,再按顺序生成参考图时,应该考虑参考图之间是否有关联,比如都是描述男孩,只不过是描述男孩的不同状态,那么需要先生成男孩的形象,再将男孩的形象作为参考图来生成男孩的不同状态。 比如你需要生成一个人在弯腰的状态和在奔跑的状态,那么你应该先生成该角色的整体基础形象作为参考图,然后再将这个整体形象作为参考图传入,分别生成弯腰状态和奔跑状态的参考图(背景、场景等物体的多种变化也是同理),特别是风格必须保持绝对一致。或者在生成第二个视频片段时,可以传入前一个片段作为参考视频以保持一致性。

  1. 生成图片完之后,需要检验:
  • 调用vision-understanding技能, 来理解图片, 验证多张图片是否一致,你可以这样调用:将多张图片输入vision-understanding技能,提示词就写: 我的要求是:xxx,场景是: xxxx。请检查一下这些图片里的 xxx,xxx,xxx在外观, 衣着,状态上等是否是一致的并且符合要求, 并且没有图片异常的情况。如果有不一致,请说明第几张图的什么不一致。
  • 如果vision-understanding技能返回的结果是不一致的,那么你需要重新生成不一致的图片,直到所有图片都一致为止。
  • 重复以上步骤,直到所有图片都一致为止。

步骤3:内容生成

  1. 确保在生成好参考图后再生成视频。
  2. 调用video-gen技能根据分镜脚本生成对应视频。生成每个视频片段时,将前面切割好的对应独立音频片段作为参考音频(reference_audio)传入。为了保持一致性,需要选择生成这个片段要用到的一致的参考图以及前序视频作为参考,来保持人物主体的一致性。 在写prompt时,参考前序视频可以写:参考[视频1]里面出现的主体,背景与物体,不要重复剧情生成。 你必须再生成第1+n个视频时将:1.前序的合适的视频传入当做参考视频以及 2.合适的参考图,3.以及片段对应的语音 每一个片段,你都需要仔细查看这个片段用到了哪些参考图,可以是多张一致性的参考图,不能漏选。所以最好你要在一开始就规划完成

步骤4:视频合并与音频替换

  1. 调用 merge-video 技能,将生成的所有视频片段按剧情顺序拼接合并为一个完整的长视频
  2. 调用 replace-audio 技能,将合并后视频的原有音频替换为用户输入的参考音频,以确保故事的声音与输入完全一致

步骤5:校验优化

  1. 校验故事总时长和音频时长是否完全一致
  2. 校验所有卡点位置是否和音频的语音节点完全对齐
  3. 校验人物、场景、物体等元素是否全程保持一致
  4. 校验故事内容是否和音频语义、用户需求完全匹配
  5. 如有不符合要求的部分,返回步骤2重新调整

依赖技能

  • automatic-speech-recognition:音频转文本,获取语音时间戳
  • get-audio-metadata:获取音频时长、节奏点等元数据
  • get-output-dir:获取输出文件夹,用于保存 plan.json 等生成文件
  • trim-audio:用于剪切音频
  • replace-audio:用于将视频的原有音频替换为输入的音频
  • merge-video:用于将多个生成的视频片段拼接合并为一个完整的视频
  • video-gen:生成视频版有声故事
  • vision-understanding(可选):理解参考图片/视频的风格

约束规则

  1. 禁止修改输入音频文件,必须直接作为最终故事的音频部分
  2. 剧情必须连贯自然,符合逻辑,不能出现内容断层
  3. 人物设定、场景风格一旦确定,不得随意变更
  4. 卡点误差不能超过0.5秒,必须精准对齐语音节点
  5. 必须完全符合用户提供的风格需求和约束条件

Frequently asked questions

What does the Audio Driven Story Gen AI skill do?

音频驱动有声故事生成工具,根据输入的音频文件、参考文本和风格需求,生成和音频时长一致、内容匹配、卡点精准的有声故事,直接使用输入音频作为故事背景音乐/配音。当用户输入音频文件+参考风格/需求,要求生成有声故事、音频匹配视频/故事时调用本技能。

Why use Audio Driven Story Gen on TypingMind?

Because you install it once and use it with any model. Audio Driven Story Gen is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Audio Driven Story Gen in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/JianhuiWei7/VideoWeaver/tree/main/FINAL_EXPERT_SKILLS/audio-driven-story-gen. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Audio Driven Story Gen?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Audio Driven Story Gen?

As many as you like. As long as a model supports skills, you can use Audio Driven Story Gen with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Audio Driven Story Gen AI skill free?

It is published on GitHub by JianhuiWei7. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇