$npx -y skills add freestylefly/canghe-skills --skill flyworks-avatar-video-1.0.0Generate videos using Flyworks (a.k.a HiFly) Digital Humans. Create talking photo videos from images, use public avatars with TTS, or clone voices for custom audio.
| 1 | # Avatar Video Generation Skill |
| 2 | |
| 3 | This skill allows you to generate videos using Flyworks (a.k.a HiFly 飞影数字人) Digital Humans. Available features: |
| 4 | 1. **Public Avatar Video**: Create video from text or audio using pre-made highly realistic avatars. |
| 5 | 2. **Talking Photo**: Create a "talking photo" video from a single image and text/audio. |
| 6 | 3. **Voice Cloning**: Clone a voice from an audio sample to use in TTS. |
| 7 | |
| 8 | For detailed documentation, see the [references/](references/) folder: |
| 9 | - [authentication.md](references/authentication.md) - API token setup |
| 10 | - [avatars.md](references/avatars.md) - Working with avatars |
| 11 | - [voices.md](references/voices.md) - Voice selection and cloning |
| 12 | - [video-generation.md](references/video-generation.md) - Video creation workflow |
| 13 | |
| 14 | ## API Token & Limitations |
| 15 | |
| 16 | This skill works with a default free-tier token, but it has limitations: |
| 17 | - **Watermark**: Generated videos will have a watermark. |
| 18 | - **Duration Limit**: Videos are limited to 30 seconds. |
| 19 | |
| 20 | **To remove limitations:** |
| 21 | 1. Register at [hifly.cc](https://hifly.cc) or [flyworks.ai](https://flyworks.ai). |
| 22 | 2. Get your API key from [User Settings](https://hifly.cc/setting). |
| 23 | 3. Set the environment variable: `export HIFLY_API_TOKEN="your_token_here"` |
| 24 | |
| 25 | ## Tools |
| 26 | |
| 27 | ### `scripts/hifly_client.py` |
| 28 | |
| 29 | The main entry point for all operations. |
| 30 | |
| 31 | #### Usage |
| 32 | |
| 33 | ```bash |
| 34 | # List available public avatars |
| 35 | python scripts/hifly_client.py list_public_avatars |
| 36 | |
| 37 | # List available public voices |
| 38 | python scripts/hifly_client.py list_public_voices |
| 39 | |
| 40 | # Create a video with a public avatar (TTS) |
| 41 | python scripts/hifly_client.py create_video --type tts --text "Hello world" --avatar "avatar_id_or_alias" --voice "voice_id_or_alias" |
| 42 | |
| 43 | # Create a video with a public avatar (Audio URL or File) |
| 44 | python scripts/hifly_client.py create_video --audio "https://... or path/to/audio.mp3" --avatar "avatar_id_or_alias" |
| 45 | |
| 46 | # Create a talked photo video using bundled assets |
| 47 | python scripts/hifly_client.py create_talking_photo --image assets/avatar.png --title "Bundled Avatar" |
| 48 | |
| 49 | # Clone a voice using bundled assets |
| 50 | python scripts/hifly_client.py clone_voice --audio assets/voice.MP3 --title "Bundled Voice" |
| 51 | |
| 52 | # Check status of generated tasks |
| 53 | python scripts/hifly_client.py check_task --id "TASK_ID" |
| 54 | |
| 55 | # Manage local aliases (saved in memory.json) |
| 56 | python scripts/hifly_client.py manage_memory add my_avatar "av_12345" |
| 57 | python scripts/hifly_client.py manage_memory list |
| 58 | ``` |
| 59 | |
| 60 | ## Examples |
| 61 | |
| 62 | ### 1. Create a simple greeting video |
| 63 | ```bash |
| 64 | # First find a voice and avatar |
| 65 | python scripts/hifly_client.py list_public_avatars |
| 66 | python scripts/hifly_client.py list_public_voices |
| 67 | |
| 68 | # Generate |
| 69 | python scripts/hifly_client.py create_video --type tts --text "Welcome to our service." --avatar "av_public_01" --voice "voice_public_01" |
| 70 | ``` |
| 71 | |
| 72 | ### 2. Use a custom talking photo |
| 73 | ```bash |
| 74 | # Create the avatar from an image URL |
| 75 | python scripts/hifly_client.py create_talking_photo --image "https://mysite.com/photo.jpg" --title "CEO Photo" |
| 76 | # Output will give you an Avatar ID, e.g., av_custom_99 |
| 77 | |
| 78 | # Save it to memory |
| 79 | python scripts/hifly_client.py manage_memory add ceo av_custom_99 |
| 80 | |
| 81 | # Generate video using the new avatar |
| 82 | python scripts/hifly_client.py create_video --type tts --text "Here is the quarterly report." --avatar ceo --voice "voice_public_01" |
| 83 | ``` |
| 84 | |
| 85 | ## Agent Behavior Guidelines |
| 86 | |
| 87 | When assisting users with video generation, follow these guidelines: |
| 88 | |
| 89 | ### Voice Selection Required |
| 90 | |
| 91 | **Video generation requires both text AND a voice.** If the user provides text but no voice: |
| 92 | |
| 93 | 1. **Check local memory first**: Run `manage_memory list` to see if the user has saved any voice aliases. |
| 94 | 2. **Ask the user to choose**: |
| 95 | - "I see you want to create a video with the text '[text]'. Which voice would you like to use?" |
| 96 | - If they have saved voices: "You have these saved voices: [list]. Or would you prefer a public voice?" |
| 97 | - If no saved voices: "Would you like to use a public voice, or clone your own voice from an audio sample first?" |
| 98 | |
| 99 | 3. **Help them select**: |
| 100 | - To see public voices: `list_public_voices` |
| 101 | - To clone a voice: `clone_voice --audio [file] --title [name]` |
| 102 | |
| 103 | ### Complete Workflow Example |
| 104 | |
| 105 | For a prompt like *"Create a talking photo video from my photo saying 'this is my AI twin'"*: |
| 106 | |
| 107 | 1. Ask: "Which voice would you like for your AI twin? You can use a public voice or clone your own." |
| 108 | 2. If they want to clone: Help them with `clone_voice` |
| 109 | 3. Create the talking photo with both text and voice: |
| 110 | ```bash |
| 111 | python scripts/hifly_client.py create_talking_photo \ |
| 112 | --image user_photo.jpg \ |
| 113 | --text "this is my AI twin" \ |
| 114 | --voice SELECTED_VOICE_ID \ |
| 115 | --title "My AI Twin" |
| 116 | ``` |
| 117 | |
| 118 | ### Saving for Later |
| 119 | |
| 120 | After creating avatars or cloning voices, offer to |