flyworks-avatar-video
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAvatar Video Generation Skill
Avatar视频生成技能
This skill allows you to generate videos using Flyworks (a.k.a HiFly 飞影数字人) Digital Humans. Available features:
- Public Avatar Video: Create video from text or audio using pre-made highly realistic avatars.
- Talking Photo: Create a "talking photo" video from a single image and text/audio.
- Voice Cloning: Clone a voice from an audio sample to use in TTS.
For detailed documentation, see the references/ folder:
- authentication.md - API token setup
- avatars.md - Working with avatars
- voices.md - Voice selection and cloning
- video-generation.md - Video creation workflow
该技能支持使用Flyworks(又名HiFly 飞影数字人)数字人生成视频。可用功能:
- 公共虚拟形象视频:使用预先制作的高度逼真虚拟形象,通过文本或音频生成视频。
- 会说话的照片:从单张图片和文本/音频创建“会说话的照片”视频。
- 语音克隆:从音频样本中克隆语音,用于TTS。
如需详细文档,请查看references/文件夹:
- authentication.md - API令牌设置
- avatars.md - 虚拟形象使用指南
- voices.md - 语音选择与克隆
- video-generation.md - 视频创建流程
API Token & Limitations
API令牌与限制
This skill works with a default free-tier token, but it has limitations:
- Watermark: Generated videos will have a watermark.
- Duration Limit: Videos are limited to 30 seconds.
To remove limitations:
- Register at hifly.cc or flyworks.ai.
- Get your API key from User Settings.
- Set the environment variable:
export HIFLY_API_TOKEN="your_token_here"
该技能使用默认的免费层级令牌,但存在以下限制:
- 水印:生成的视频将带有水印。
- 时长限制:视频最长为30秒。
如需解除限制:
- 在hifly.cc或flyworks.ai注册账号。
- 从用户设置获取API密钥。
- 设置环境变量:
export HIFLY_API_TOKEN="your_token_here"
Tools
工具
scripts/hifly_client.py
scripts/hifly_client.pyscripts/hifly_client.py
scripts/hifly_client.pyThe main entry point for all operations.
所有操作的主入口。
Usage
使用方法
bash
undefinedbash
undefinedList available public avatars
列出可用的公共虚拟形象
python scripts/hifly_client.py list_public_avatars
python scripts/hifly_client.py list_public_avatars
List available public voices
列出可用的公共语音
python scripts/hifly_client.py list_public_voices
python scripts/hifly_client.py list_public_voices
Create a video with a public avatar (TTS)
使用公共虚拟形象创建视频(TTS)
python scripts/hifly_client.py create_video --type tts --text "Hello world" --avatar "avatar_id_or_alias" --voice "voice_id_or_alias"
python scripts/hifly_client.py create_video --type tts --text "Hello world" --avatar "avatar_id_or_alias" --voice "voice_id_or_alias"
Create a video with a public avatar (Audio URL or File)
使用公共虚拟形象创建视频(音频URL或文件)
python scripts/hifly_client.py create_video --audio "https://... or path/to/audio.mp3" --avatar "avatar_id_or_alias"
python scripts/hifly_client.py create_video --audio "https://... or path/to/audio.mp3" --avatar "avatar_id_or_alias"
Create a talked photo video using bundled assets
使用内置资源创建会说话的照片视频
python scripts/hifly_client.py create_talking_photo --image assets/avatar.png --title "Bundled Avatar"
python scripts/hifly_client.py create_talking_photo --image assets/avatar.png --title "Bundled Avatar"
Clone a voice using bundled assets
使用内置资源克隆语音
python scripts/hifly_client.py clone_voice --audio assets/voice.MP3 --title "Bundled Voice"
python scripts/hifly_client.py clone_voice --audio assets/voice.MP3 --title "Bundled Voice"
Check status of generated tasks
检查生成任务的状态
python scripts/hifly_client.py check_task --id "TASK_ID"
python scripts/hifly_client.py check_task --id "TASK_ID"
Manage local aliases (saved in memory.json)
管理本地别名(保存于memory.json)
python scripts/hifly_client.py manage_memory add my_avatar "av_12345"
python scripts/hifly_client.py manage_memory list
undefinedpython scripts/hifly_client.py manage_memory add my_avatar "av_12345"
python scripts/hifly_client.py manage_memory list
undefinedExamples
示例
1. Create a simple greeting video
1. 创建简单问候视频
bash
undefinedbash
undefinedFirst find a voice and avatar
先找到合适的语音和虚拟形象
python scripts/hifly_client.py list_public_avatars
python scripts/hifly_client.py list_public_voices
python scripts/hifly_client.py list_public_avatars
python scripts/hifly_client.py list_public_voices
Generate
生成视频
python scripts/hifly_client.py create_video --type tts --text "Welcome to our service." --avatar "av_public_01" --voice "voice_public_01"
undefinedpython scripts/hifly_client.py create_video --type tts --text "Welcome to our service." --avatar "av_public_01" --voice "voice_public_01"
undefined2. Use a custom talking photo
2. 使用自定义会说话的照片
bash
undefinedbash
undefinedCreate the avatar from an image URL
通过图片URL创建虚拟形象
python scripts/hifly_client.py create_talking_photo --image "https://mysite.com/photo.jpg" --title "CEO Photo"
python scripts/hifly_client.py create_talking_photo --image "https://mysite.com/photo.jpg" --title "CEO Photo"
Output will give you an Avatar ID, e.g., av_custom_99
输出会给出虚拟形象ID,例如av_custom_99
Save it to memory
将其保存到本地记忆
python scripts/hifly_client.py manage_memory add ceo av_custom_99
python scripts/hifly_client.py manage_memory add ceo av_custom_99
Generate video using the new avatar
使用新虚拟形象生成视频
python scripts/hifly_client.py create_video --type tts --text "Here is the quarterly report." --avatar ceo --voice "voice_public_01"
undefinedpython scripts/hifly_client.py create_video --type tts --text "Here is the quarterly report." --avatar ceo --voice "voice_public_01"
undefinedAgent Behavior Guidelines
Agent行为准则
When assisting users with video generation, follow these guidelines:
协助用户生成视频时,请遵循以下准则:
Voice Selection Required
语音选择要求
Video generation requires both text AND a voice. If the user provides text but no voice:
-
Check local memory first: Runto see if the user has saved any voice aliases.
manage_memory list -
Ask the user to choose:
- "I see you want to create a video with the text '[text]'. Which voice would you like to use?"
- If they have saved voices: "You have these saved voices: [list]. Or would you prefer a public voice?"
- If no saved voices: "Would you like to use a public voice, or clone your own voice from an audio sample first?"
-
Help them select:
- To see public voices:
list_public_voices - To clone a voice:
clone_voice --audio [file] --title [name]
- To see public voices:
视频生成需要同时提供文本和语音。 如果用户仅提供文本未指定语音:
-
先检查本地记忆:运行查看用户是否已保存语音别名。
manage_memory list -
请用户选择:
- “我了解您想使用文本‘[text]’创建视频。请问您想使用哪种语音?”
- 如果用户有保存的语音:“您已保存以下语音:[列表]。或者您想使用公共语音?”
- 如果没有保存的语音:“您想使用公共语音,还是先从音频样本克隆自己的语音?”
-
协助用户选择:
- 查看公共语音:
list_public_voices - 克隆语音:
clone_voice --audio [file] --title [name]
- 查看公共语音:
Complete Workflow Example
完整流程示例
For a prompt like "Create a talking photo video from my photo saying 'this is my AI twin'":
- Ask: "Which voice would you like for your AI twin? You can use a public voice or clone your own."
- If they want to clone: Help them with
clone_voice - Create the talking photo with both text and voice:
bash
python scripts/hifly_client.py create_talking_photo \ --image user_photo.jpg \ --text "this is my AI twin" \ --voice SELECTED_VOICE_ID \ --title "My AI Twin"
对于类似“用我的照片创建一个会说‘this is my AI twin’的会说话的照片视频”的请求:
- 询问:“您想为AI分身使用哪种语音?可以选择公共语音或克隆自己的语音。”
- 如果用户想要克隆:协助执行命令
clone_voice - 使用文本和语音创建会说话的照片:
bash
python scripts/hifly_client.py create_talking_photo \ --image user_photo.jpg \ --text "this is my AI twin" \ --voice SELECTED_VOICE_ID \ --title "My AI Twin"
Saving for Later
保存以备后用
After creating avatars or cloning voices, offer to save them:
bash
python scripts/hifly_client.py manage_memory add my_avatar AVATAR_ID --kind avatar
python scripts/hifly_client.py manage_memory add my_voice VOICE_ID --kind voice创建虚拟形象或克隆语音后,可提议保存:
bash
python scripts/hifly_client.py manage_memory add my_avatar AVATAR_ID --kind avatar
python scripts/hifly_client.py manage_memory add my_voice VOICE_ID --kind voice