SuperAPI AI Directory

voice-persona

Agents & models

View repository

Updated 10-15 20:33

About this skill

Voice-Persona · Voice Chat + Persona Voice

Turn an Agent into a robot that can understand voice and reply in a persona voice—the first IM voice duplex closed-loop skill.

  • 🎙 Understands voice: any voice file to text,supports WeChat .silk format(unique—most open-source solutions cannot decode WeChat voice)
  • 🔊 Voice bubble replies: persona reply → Edge TTS multi-voice → silk-encoded voice sent back to WeChat(pilk bidirectional, first in the industry to achieve this)
  • 🗣 Persona replies: 6 built-in personas (Energetic Girl / Gentle Confidante / Steady Uncle / News Anchor / Sunny Buddy / Casual Friend), each with a dedicated Chinese voice + tone
  • 💰 Zero API cost: faster-whisper (local) + Edge TTS (free) + pilk (open source) all free, optional LLM to enhance tone

Voice chat for agents: transcribe voice (incl. WeChat silk) → reply with persona voices → back to WeChat voice bubbles. First IM two-way voice skill.

Differences from similar solutions (tested research as of 2026-09)

Solution Problem
jozhn/wechat-voice-decode-skill Only one-way decoding and transcription, no TTS/persona/voice reply, locked to the openclaw path
zhayujie/chatgpt-on-wechat (46k★) Voice relies on cloud ASR/TTS, personal WeChat channel has account ban risk, no native silk closed loop
whisperbot / Telegram transcription bot family All one-way "voice→text", no multi-voice persona voice replies
SillyTavern (33k★) Character voices are powerful but only in their own UI, not connected to WeChat/Telegram voice messages
Microsoft cloud voice skills (Azure/OpenAI TTS) Single capability + paid cloud API, no IM scenario

Others do "dictation" or "read-aloud"; voice-persona does "speak with a persona voice in WeChat/Telegram".

Quick validation / Smoke Test (30 seconds, no key required)

Run from this skill directory (this repository already includes the scripts, no extra clone needed):

cd plugins/all-skills/skills/voice-persona   # 或直接进入 voice-persona 技能目录
python3 scripts/voice_persona.py demo
# 🎙 语音 → 文字 → [元气少女/沉稳大叔/新闻播报] 三音色回复音频
# ✅ 全链路通过:语音输入 → 转写 → 人格回复 → 语音输出

Prerequisites (dependencies)

pip install faster-whisper pilk edge-tts    # 首次使用安装
# 可选:--llm 增强口吻需要 LLM_API_KEY / OpenAI 兼容 URL(与本集合其他技能一致)

Usage

All commands call the scripts from within the skill directory using relative paths (no need to install to system PATH):

# 1. 语音 → 文字(微信语音直接传 .silk 文件即可)
python3 scripts/voice_persona.py stt wechat_voice.silk
python3 scripts/voice_persona.py stt meeting.m4a --model small

# 2. 文字 → 人格回复 → 语音 mp3
python3 scripts/voice_persona.py speak "明天记得交报告" --persona yunjian --out reply.mp3

# 3. 只取人格化文本(接你自己的 TTS/IM)
python3 scripts/voice_persona.py chat "明天记得交报告" --persona xiaoyi

# 4. 列出人格
python3 scripts/voice_persona.py list

# 5. 音频 → 微信 silk 语音(可回发微信语音气泡)
python3 scripts/voice_persona.py to_silk reply.mp3 --out reply.silk

# 6. 一条命令双向闭环:人格语音 → 微信格式
python3 scripts/voice_persona.py speak "明天早上十点开会" --persona xiaoyi --out r.mp3
python3 scripts/voice_persona.py to_silk r.mp3          # → r.silk(#!SILK_V3)

Install in Hermes (optional)

This repository's scripts can be run directly; if using Hermes Agent, you can also install from the skill source repository for automatic integration:

hermes skills install jiawood2006/hermes-skills/skills/voice-persona

Persona library (extensible)

In voice_persona.py at the top PERSONAS / STYLE_WORDS just add:

key Persona Edge TTS voice Tone
xiaoyi Energetic Girl · Xiaoyi zh-CN-XiaoyiNeural hehe, la/ya
xiaoxuan Gentle Confidante · Xiaoxuan zh-CN-XiaoxuanNeural don't worry, take your time
yunjian Steady Uncle · Yunjian zh-CN-YunjianNeural speak plainly, conclusion first
yunyang News Anchor · Yunyang zh-CN-YunyangNeural broadcast, well-organized
yunxi Sunny Buddy · Yunxi zh-CN-YunxiNeural come on, no problem
xiaochen Casual Friend · Xiaochen zh-CN-XiaochenNeural colloquial, like a friend

Agent integration (Hermes and other frameworks)

STT integration: pass the voice message file received by the platform to stt subcommand → get the text into the conversation stream. Hermes's stt.provider: local_command + HERMES_LOCAL_STT_COMMAND environment variable can directly connect WeChat voice automatically (pointing to the absolute path of the script under this skill's scripts/):

HERMES_LOCAL_STT_COMMAND=<python> <...>/skills/voice-persona/scripts/voice_persona.py stt {input_path} --model {model} --output_dir {output_dir} --language {language}

TTS integration: personalized text → speak outputs mp3 → the platform sends voice.

Known pitfalls

  • WeChat silk must be decoded with pilk:pilk.decode() outputs raw PCM without a RIFF header, which whisper cannot read—use pilk.silk_to_wav()(outputs standard wav, already tested)
  • First run faster-whisper will download the model (small ~500MB), waiting 1-3 minutes is normal
  • Edge TTS requires internet(Microsoft's free interface); when offline, speak will fail, stt/chat are unaffected
  • Transcription quality: on Intel Mac CPU with int8, the small model is good enough for Chinese; for noisy/dialect audio, base/small is recommended, or resend

Verification record (real output)

  • WeChat .silk voice transcription tested successfully ("API这一块我会让海沃云来对接…" 39 characters/17 characters, two segments)
  • demo full pipeline: say synthesizes Chinese → stt transcribes → 3 persona replies → 3 mp3s (27-31KB) ✅