← 返回
未分类 Key 中文

Digital Singer

Turn your NuwaAI digital avatar into a singing performer! The avatar sings with lip-synced mouth movements driven by vocal audio, with synchronized backgroun...
将NuwaAI数字形象变成歌手,口型随音频同步,支持背景同步
jianglingling007 jianglingling007 来源
未分类 clawhub v1.3.0 1 版本 99720.7 Key: 需要
★ 0
Stars
📥 357
下载
💾 0
安装
1
版本
#latest

概述

🎤 Digital Singer — NuwaAI Avatar Singing

Turn your NuwaAI digital avatar into a singing performer with lip-synced mouth movements.

How It Works

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:

  • speech (vocal-only): Drives the avatar's mouth movements via NuwaAI avatar control messages
  • music (accompaniment): Plays simultaneously via browser element

Battle Flow

  1. Avatar greets user, lists available songs
  2. User picks a song
  3. Avatar sings the upper half (vocal drives lip-sync + accompaniment plays in sync)
  4. Avatar says "your turn" → accompaniment for lower half plays → user sings along (ASR captures voice)
  5. Battle scoring + blind box reward
  6. Ask to continue

User Preparation (What You Need Before Using)

1. NuwaAI Account (Required)

Sign up at nuwaai.com (free) and create a digital avatar. You need:

  • API Key — from your NuwaAI dashboard
  • Avatar ID — the avatar you want to sing
  • User ID — your NuwaAI user ID

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"
}

2. LLM API (Required)

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 key
  • QWEN_MODEL — Model name (default: qwen-plus)

3. Song Audio Files (Required)

Each song needs 3 audio files placed in the skill directory:

FilePurposeExample
------------------------
{song}高潮上清唱.wavUpper half vocal (a cappella) — drives avatar lip-sync十年高潮上清唱.wav
{song}高潮上伴奏.MP3Upper half accompaniment — plays in sync with avatar十年高潮上伴奏.MP3
{song}高潮下伴奏.MP3Lower half accompaniment — plays when user sings十年高潮下伴奏.MP3

How to prepare these files:

  • Use any audio editing tool (e.g. Audacity, Adobe Audition) to split songs into upper/lower halves
  • Use vocal separation tools (e.g. UVR, Demucs) to extract a cappella (vocal-only) from the upper half
  • Export accompaniment as MP3, vocal as WAV (any FFmpeg-supported format works)
  • Place all files in the skill directory (same folder as server.mjs)

4. Song Registry (Required)

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...
};

5. FFmpeg (Required)

Install FFmpeg for audio format conversion:

# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg

6. Node.js 18+ (Required)

node --version  # must be >= 18

Quick Start

  1. Complete all preparation steps above
  2. Copy example song files from assets/songs/ to the skill directory:

```bash

cp /assets/songs/* /

```

This includes a ready-to-use demo song: 十年 (陈奕迅) with vocal, upper and lower accompaniment files.

  1. Start the server:

```bash

node /server.mjs

```

  1. Open http://localhost:3098 in browser
  2. Enter NuwaAI credentials (if not pre-configured)
  3. Pick a song and start singing!

Included Example Song

The skill ships with one demo song in assets/songs/:

  • 十年高潮上清唱.wav — vocal (a cappella)
  • 十年高潮上伴奏.MP3 — upper half accompaniment
  • 十年高潮下伴奏.MP3 — lower half accompaniment

Copy them to the skill root directory to use. The song "十年" is pre-registered in server.mjs.

NuwaAI Integration

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 mode
  • segment: Chunk index, -1 = last chunk
  • Audio: 16kHz mono PCM, base64 encoded

Features

  • 🎤 Avatar lip-sync singing via NuwaAI humanctrl
  • 🎵 Synchronized accompaniment playback
  • 🗣️ ASR voice capture for user singing
  • 🎯 Fun battle scoring system
  • 🎁 Blind box rewards
  • ⏸️ Interruptible speech (not during singing)
  • 📱 Responsive web interface

Requirements

  • Node.js 18+
  • FFmpeg (for audio → PCM conversion)
  • NuwaAI account with avatar
  • Modern browser (WebRTC + microphone)

版本历史

共 1 个版本

  • v1.3.0 当前
    2026-05-07 18:52 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

suspicious
查看报告

🔗 相关推荐

design-media

Claw Body

jianglingling007
让爪子拥有身体!将AI爪子变成实时数字形象,具备面部、声音和表情。面对面与爪子交谈——而不只是文字...
★ 0 📥 578

Claw Presenter

jianglingling007
准备PPT/PDF讲解稿,将幻灯片转为图片并生成逐页演讲词。触发词:准备PPT讲解稿、准备演讲稿、生成演讲词、prepare presentation narration.
★ 0 📥 393

Session Relay

jianglingling007
跨上下文窗口边界的自动会话连续性和任务交接。使用时机:当上下文令牌使用量超过模型上下文窗口的 70% 时,...
★ 0 📥 388