跳至主要内容
小龙虾小龙虾AI
🤖

ComfyUI TTS

Convert text to speech audio via ComfyUI's Qwen-TTS API, supporting customizable voice, style, model, and output options.

下载395
星标0
版本1.0.0
设计媒体
安全通过
💬Prompt

技能说明


name: comfyui-tts description: "Generate speech audio using ComfyUI Qwen-TTS service. Invoke when user needs text-to-speech conversion or voice generation through ComfyUI." metadata: { "openclaw": { "emoji": "🔊", "requires": { "bins": ["curl", "jq"] }, "install": [], }, }

ComfyUI TTS Skill

Generate speech audio using ComfyUI's Qwen-TTS service. This skill allows you to convert text to speech through ComfyUI's API.

Configuration

Environment Variables

Set these environment variables to configure the ComfyUI connection:

export COMFYUI_HOST="localhost"      # ComfyUI server host
export COMFYUI_PORT="8188"           # ComfyUI server port
export COMFYUI_OUTPUT_DIR=""         # Optional: Custom output directory

Usage

Basic Text-to-Speech

Generate audio from text using default settings:

scripts/tts.sh "你好,世界"

Advanced Options

Customize voice characteristics:

# Specify character and style
scripts/tts.sh "你好" --character "Girl" --style "Emotional"

# Change model size
scripts/tts.sh "你好" --model "3B"

# Specify output file
scripts/tts.sh "你好" --output "/path/to/output.wav"

# Combine options
scripts/tts.sh "你好,这是测试" \
  --character "Girl" \
  --style "Emotional" \
  --model "1.7B" \
  --output "~/audio/test.wav"

Available Options

OptionDescriptionDefault
--characterVoice character (Girl/Boy/etc.)"Girl"
--styleSpeaking style (Emotional/Neutral/etc.)"Emotional"
--modelModel size (0.5B/1.7B/3B)"1.7B"
--outputOutput file pathAuto-generated
--temperatureGeneration temperature (0-1)0.9
--top-pTop-p sampling0.9
--top-kTop-k sampling50

Workflow

The skill performs these steps:

  1. Construct Workflow: Builds a ComfyUI workflow JSON with your text and settings
  2. Submit Job: Sends the workflow to ComfyUI's /prompt endpoint
  3. Poll Status: Monitors job completion via /history endpoint
  4. Retrieve Audio: Returns the path to the generated audio file

Troubleshooting

Connection Refused

  • Verify ComfyUI is running: curl http://$COMFYUI_HOST:$COMFYUI_PORT/system_stats
  • Check host and port settings

Job Timeout

  • Large models (3B) take longer to generate
  • Try smaller models (0.5B, 1.7B) for faster results

Output Not Found

  • Check ComfyUI's output directory configuration
  • Verify file permissions

API Reference

The skill uses ComfyUI's native API endpoints:

  • POST /prompt - Submit workflow
  • GET /history - Check job status
  • Output files are saved to ComfyUI's configured output directory

如何使用「ComfyUI TTS」?

  1. 打开小龙虾AI(Web 或 iOS App)
  2. 点击上方「立即使用」按钮,或在对话框中输入任务描述
  3. 小龙虾AI 会自动匹配并调用「ComfyUI TTS」技能完成任务
  4. 结果即时呈现,支持继续对话优化

相关技能