Text-to-Speech
Transformers
ONNX
GGUF
Chinese
English
voice-dialogue
speech-recognition
large-language-model
asr
tts
llm
chinese
english
real-time
conversational
Instructions to use MoYoYoTech/VoiceDialogue with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MoYoYoTech/VoiceDialogue with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="MoYoYoTech/VoiceDialogue") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("MoYoYoTech/VoiceDialogue", dtype="auto") - llama-cpp-python
How to use MoYoYoTech/VoiceDialogue with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="MoYoYoTech/VoiceDialogue", filename="assets/models/llm/qwen/Qwen3-8B-Q6_K.gguf", )
llm.create_chat_completion( messages = "\"The answer to the universe is 42\"" )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use MoYoYoTech/VoiceDialogue with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MoYoYoTech/VoiceDialogue:Q6_K # Run inference directly in the terminal: llama-cli -hf MoYoYoTech/VoiceDialogue:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MoYoYoTech/VoiceDialogue:Q6_K # Run inference directly in the terminal: llama-cli -hf MoYoYoTech/VoiceDialogue:Q6_K
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf MoYoYoTech/VoiceDialogue:Q6_K # Run inference directly in the terminal: ./llama-cli -hf MoYoYoTech/VoiceDialogue:Q6_K
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf MoYoYoTech/VoiceDialogue:Q6_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf MoYoYoTech/VoiceDialogue:Q6_K
Use Docker
docker model run hf.co/MoYoYoTech/VoiceDialogue:Q6_K
- LM Studio
- Jan
- Ollama
How to use MoYoYoTech/VoiceDialogue with Ollama:
ollama run hf.co/MoYoYoTech/VoiceDialogue:Q6_K
- Unsloth Studio
How to use MoYoYoTech/VoiceDialogue with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MoYoYoTech/VoiceDialogue to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MoYoYoTech/VoiceDialogue to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MoYoYoTech/VoiceDialogue to start chatting
- Pi
How to use MoYoYoTech/VoiceDialogue with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf MoYoYoTech/VoiceDialogue:Q6_K
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "MoYoYoTech/VoiceDialogue:Q6_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use MoYoYoTech/VoiceDialogue with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf MoYoYoTech/VoiceDialogue:Q6_K
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default MoYoYoTech/VoiceDialogue:Q6_K
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use MoYoYoTech/VoiceDialogue with Docker Model Runner:
docker model run hf.co/MoYoYoTech/VoiceDialogue:Q6_K
- Lemonade
How to use MoYoYoTech/VoiceDialogue with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MoYoYoTech/VoiceDialogue:Q6_K
Run and chat with the model
lemonade run user.VoiceDialogue-Q6_K
List all available models
lemonade list
VoiceDialogue 安装指南
本文档提供 VoiceDialogue 智能语音对话系统的详细安装说明。
系统要求
在开始安装之前,请确保您的系统满足以下要求:
- 操作系统: macOS 14+ (推荐)
- Python 版本: 3.9 或更高版本
- 内存要求: 至少 16GB RAM (推荐 32GB 用于大模型)
- 存储空间: 至少 20GB 可用空间 (用于模型文件)
安装步骤
1. 克隆项目
git clone https://huggingface.co/MoYoYoTech/VoiceDialogue
cd VoiceDialogue
2. 创建并激活虚拟环境
建议使用虚拟环境来避免依赖冲突:
# 使用 uv (推荐)
pip install uv
uv venv
source .venv/bin/activate
# 或使用 conda
conda create -n voicedialogue python=3.11
conda activate voicedialogue
# 或使用 venv
python -m venv voicedialogue
source voicedialogue/bin/activate
3. 安装项目依赖
# 使用 uv (推荐)
WHISPER_COREML=1 CMAKE_ARGS="-DGGML_METAL=on" uv sync
# 或使用 pip
WHISPER_COREML=1 CMAKE_ARGS="-DGGML_METAL=on" pip install -r requirements.txt
4. 安装音频处理工具
# macOS
brew install ffmpeg
5. 安装额外依赖
# 安装 kokoro-onnx
uv pip install kokoro-onnx
# 或
pip install kokoro-onnx
# 重新安装指定版本的 numpy
uv pip install numpy==1.26.4
# 或
pip install numpy==1.26.4
验证安装
安装完成后,可以通过以下命令验证安装是否成功:
# 查看帮助信息
python main.py --help
# 启动系统(默认使用中文,沈逸角色)
python main.py
如果看到 "服务启动成功" 提示,说明安装成功。
故障排除
1. 模型下载失败
- 问题: 网络连接超时或模型下载失败。
- 解决方案: 设置 Hugging Face 镜像。
export HF_ENDPOINT=https://hf-mirror.com
pip install -U huggingface_hub
2. 音频设备问题
- 问题: 找不到音频设备或权限被拒绝。
- macOS 解决方案: 系统设置 → 隐私与安全性 → 麦克风 → 启用你的终端应用 (如 iTerm, Terminal)。
3. 内存不足错误 (OOM)
- 问题:
CUDA out of memory或 RAM 不足。 - 解决方案: LLM 是主要的内存消耗者。你可以通过修改
src/VoiceDialogue/services/text/generator.py来降低资源消耗:- 更换模型: 将模型路径指向一个更小的模型(如 7B Q4 量化模型)。
- 减少批处理大小: 减小模型参数中的
n_batch值(如256)。 - 减少上下文长度: 减小
n_ctx的值(如1024)。
4. 依赖包冲突
- 问题: 包版本冲突或导入错误。
- 解决方案: 强烈建议在虚拟环境中安装。如果遇到问题,尝试重建虚拟环境。
# 使用 conda
conda deactivate
conda env remove -n voicedialogue
# 使用 uv
rm -rf .venv
uv venv
5. FFmpeg 相关错误
- 问题: 音频处理失败或编解码错误。
- 解决方案: 确保正确安装 FFmpeg:
# 检查 FFmpeg 安装
ffmpeg -version
# 重新安装 FFmpeg
# macOS
brew reinstall ffmpeg
6. Python 版本兼容性
- 问题: Python 版本过低导致的兼容性问题。
- 解决方案: 确保使用 Python 3.11+ 版本:
python --version
# 如果版本过低,请升级或使用虚拟环境
下一步
安装完成后,您可以:
如果遇到其他问题,请查看 完整故障排除指南 或提交 Issue。