Install
openclaw skills install digital-singerTurn your NuwaAI digital avatar into a singing performer! The avatar sings with lip-synced mouth movements driven by vocal audio, with synchronized background accompaniment. Supports duet/battle mode: avatar sings the first half, user sings the second half with accompaniment. Includes fun scoring and blind box rewards. Powered by NuwaAI humanctrl API. Use when: user wants the digital avatar to sing, karaoke battle, duet mode, or digital human singing.
openclaw skills install digital-singerTurn your NuwaAI digital avatar into a singing performer with lip-synced mouth movements.
Audio files → FFmpeg PCM conversion → NuwaAI humanctrl avatar messages → Avatar sings with lip-sync
+ Browser <audio> plays accompaniment in sync
Key concept: Two audio streams work together:
avatar control messages<audio> elementSign up at nuwaai.com (free) and create a digital avatar. You need:
Enter these in the browser interface, or pre-configure in .nuwa-config.json:
{
"avatarId": "your-avatar-id",
"apiKey": "your-api-key",
"userId": "your-user-id"
}
The singing host (conversation agent) needs an OpenAI-compatible LLM API. Configure in server.mjs or via environment variables:
DASHSCOPE_BASE_URL — API endpoint (default: Dashscope)DASHSCOPE_API_KEY — API keyQWEN_MODEL — Model name (default: qwen-plus)Each song needs 3 audio files placed in the skill directory:
| File | Purpose | Example |
|---|---|---|
{song}高潮上清唱.wav | Upper half vocal (a cappella) — drives avatar lip-sync | 十年高潮上清唱.wav |
{song}高潮上伴奏.MP3 | Upper half accompaniment — plays in sync with avatar | 十年高潮上伴奏.MP3 |
{song}高潮下伴奏.MP3 | Lower half accompaniment — plays when user sings | 十年高潮下伴奏.MP3 |
How to prepare these files:
server.mjs)After preparing audio files, register each song in server.mjs SONGS object:
const SONGS = {
"十年": {
artist: "陈奕迅",
acappella_upper: "十年高潮上清唱.wav",
accomp_upper: "十年高潮上伴奏.MP3",
accomp_lower: "十年高潮下伴奏.MP3",
},
// Add more songs...
};
Install FFmpeg for audio format conversion:
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg
node --version # must be >= 18
assets/songs/ to the skill directory:
cp <skill-dir>/assets/songs/* <skill-dir>/
This includes a ready-to-use demo song: 十年 (陈奕迅) with vocal, upper and lower accompaniment files.node <skill-dir>/server.mjs
http://localhost:3098 in browserThe skill ships with one demo song in assets/songs/:
十年高潮上清唱.wav — vocal (a cappella)十年高潮上伴奏.MP3 — upper half accompaniment十年高潮下伴奏.MP3 — lower half accompanimentCopy them to the skill root directory to use. The song "十年" is pre-registered in server.mjs.
Uses humanctrl WebSocket with ASR enabled. Avatar control message format:
{
"type": "avatar",
"data": {
"content": "",
"audio": {
"segment": 0,
"speech": "<base64 PCM>",
"music": "<base64 PCM>"
}
}
}
speech: Vocal-only PCM driving lip-sync (≤10KB per chunk)music: Same as speech for a cappella modesegment: Chunk index, -1 = last chunk