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 (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -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 serve -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 serve -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 serve -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
- OpenClaw new
How to use MoYoYoTech/VoiceDialogue with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf MoYoYoTech/VoiceDialogue:Q6_K
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "MoYoYoTech/VoiceDialogue:Q6_K" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- 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
| import asyncio | |
| import multiprocessing | |
| import threading | |
| from collections import OrderedDict | |
| from voice_dialogue.utils.cache import LRUCacheDict | |
| from .session_manager import SessionIdManager | |
| from .state_manager import VoiceStateManager | |
| # ======================= 应用配置常量 ======================= | |
| # 全局调试模式状态 | |
| DEBUG_MODE = False | |
| def set_debug_mode(enabled: bool): | |
| """设置全局调试模式""" | |
| global DEBUG_MODE | |
| DEBUG_MODE = enabled | |
| def is_debug_mode() -> bool: | |
| """检查是否启用了调试模式""" | |
| return DEBUG_MODE | |
| # ======================= 音频配置常量 ======================= | |
| # 音频采样率与窗口大小映射配置 | |
| SAMPLE_RATE_WINDOW_SIZE_MAPPING = { | |
| # 电话语音常用采样率,窗口大小选择512便于在较低采样率下进行相对精细的短时分析 | |
| 8000: 512, | |
| # 常见的语音处理采样率,例如语音识别等场景,512的窗口大小在这个采样率下能较好地平衡频率分辨率和时间分辨率 | |
| 16000: 512, | |
| # 一些音频录制设备的标准采样率,1024的窗口大小可以获取更宽的频率范围信息,适合音频分析等应用 | |
| 44100: 1024, | |
| # 专业音频领域常用采样率,更高的采样率需要适当增大窗口大小以充分利用高分辨率优势,2048的窗口大小有助于提取更丰富的音频特征 | |
| 48000: 2048, | |
| # 高清音频采样率,对于这样高的采样率,更大的窗口大小可以让我们在频域分析时有更好的表现,这里选择4096作为窗口大小 | |
| 96000: 4096, | |
| # 超高清音频采样率,对应更大的窗口尺寸便于在处理这种高质量音频时获得更精准的频谱等信息 | |
| 192000: 8192 | |
| } | |
| # 默认音频配置 | |
| DEFAULT_SAMPLE_RATE = 16000 | |
| DEFAULT_WINDOW_SIZE = 512 | |
| # ======================= 队列变量 ======================= | |
| # 音频处理相关队列 | |
| audio_frames_queue = multiprocessing.Queue() | |
| user_voice_queue = multiprocessing.Queue() | |
| transcribed_text_queue = multiprocessing.Queue() | |
| text_input_queue = multiprocessing.Queue() | |
| audio_output_queue = multiprocessing.Queue() | |
| websocket_message_queue = asyncio.Queue() | |
| # ======================= 全局状态实例 ======================= | |
| # 语音状态管理器实例 | |
| voice_state_manager = VoiceStateManager() | |
| # 会话缓存 | |
| chat_history_cache: dict[str, OrderedDict] = {} | |
| session_manager: SessionIdManager = SessionIdManager() | |
| dropped_audio_cache = LRUCacheDict(maxsize=50) | |
| # ======================= 线程事件对象 ======================= | |
| # 音频播放相关事件 | |
| audio_playing_event = threading.Event() | |
| silence_over_threshold_event = threading.Event() | |
| user_still_speaking_event = threading.Event() | |
| user_interrupting_playback_event = threading.Event() | |
| # 中断任务ID | |
| interrupt_task_id = '' | |