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
- 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
Add robust lifecycle management for `audio_player` service in system routes
Browse files- Implement `stop` and `resume` functionality for `audio_player` with timeout handling.
- Add readiness checks and informative logging to ensure service stability during start and stop operations.
- Allow system continuation even if `audio_player` encounters errors or is unavailable.
|
@@ -136,6 +136,26 @@ async def stop_system(request: Request):
|
|
| 136 |
except Exception as e:
|
| 137 |
logger.error(f"停止音频捕获服务时发生错误: {e}", exc_info=True)
|
| 138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
_system_status["status"] = "stopped"
|
| 140 |
_system_status["start_time"] = None
|
| 141 |
_system_status["active_sessions"] = 0
|
|
@@ -183,6 +203,33 @@ async def _start_system_background(request: Request):
|
|
| 183 |
if not service_manager:
|
| 184 |
raise RuntimeError("服务管理器未初始化")
|
| 185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
# 检查audio_capture服务是否已存在
|
| 187 |
if service_manager.is_service_running("audio_capture"):
|
| 188 |
logger.info("音频捕获服务已在运行")
|
|
|
|
| 136 |
except Exception as e:
|
| 137 |
logger.error(f"停止音频捕获服务时发生错误: {e}", exc_info=True)
|
| 138 |
|
| 139 |
+
# 停止audio_player服务
|
| 140 |
+
if service_manager.is_service_running("audio_player"):
|
| 141 |
+
audio_player_service = service_manager.get_service("audio_player")
|
| 142 |
+
if audio_player_service:
|
| 143 |
+
try:
|
| 144 |
+
# 首先停止音频播放
|
| 145 |
+
audio_player_service.stop()
|
| 146 |
+
logger.info("音频播放服务已停止播放")
|
| 147 |
+
|
| 148 |
+
# 等待当前播放完成,但设置超时
|
| 149 |
+
timeout = 3
|
| 150 |
+
start_time = time.time()
|
| 151 |
+
while not audio_player_service.is_stopped and (time.time() - start_time) < timeout:
|
| 152 |
+
await asyncio.sleep(0.1)
|
| 153 |
+
|
| 154 |
+
logger.info("音频播放服务停止完成")
|
| 155 |
+
|
| 156 |
+
except Exception as e:
|
| 157 |
+
logger.error(f"停止音频播放服务时发生错误: {e}", exc_info=True)
|
| 158 |
+
|
| 159 |
_system_status["status"] = "stopped"
|
| 160 |
_system_status["start_time"] = None
|
| 161 |
_system_status["active_sessions"] = 0
|
|
|
|
| 203 |
if not service_manager:
|
| 204 |
raise RuntimeError("服务管理器未初始化")
|
| 205 |
|
| 206 |
+
audio_player_service = service_manager.get_service("audio_player")
|
| 207 |
+
if audio_player_service:
|
| 208 |
+
try:
|
| 209 |
+
if audio_player_service.is_stopped:
|
| 210 |
+
# 如果服务处于停止状态,恢复运行
|
| 211 |
+
audio_player_service.resume()
|
| 212 |
+
logger.info("音频播放服务已恢复运行")
|
| 213 |
+
elif not audio_player_service.is_ready:
|
| 214 |
+
# 如果服务未准备就绪,等待一段时间
|
| 215 |
+
timeout = 5
|
| 216 |
+
start_time = time.time()
|
| 217 |
+
while not audio_player_service.is_ready and (time.time() - start_time) < timeout:
|
| 218 |
+
await asyncio.sleep(0.1)
|
| 219 |
+
|
| 220 |
+
if audio_player_service.is_ready:
|
| 221 |
+
logger.info("音频播放服务已准备就绪")
|
| 222 |
+
else:
|
| 223 |
+
logger.warning("音频播放服务启动超时,但继续启动系统")
|
| 224 |
+
else:
|
| 225 |
+
logger.info("音频播放服务已在运行中")
|
| 226 |
+
|
| 227 |
+
except Exception as e:
|
| 228 |
+
logger.error(f"处理音频播放服务时发生错误: {e}", exc_info=True)
|
| 229 |
+
# 不因为audio_player错误而阻止系统启动
|
| 230 |
+
else:
|
| 231 |
+
logger.warning("未找到音频播放服务,系统将继续启动但可能无法播放音频")
|
| 232 |
+
|
| 233 |
# 检查audio_capture服务是否已存在
|
| 234 |
if service_manager.is_service_running("audio_capture"):
|
| 235 |
logger.info("音频捕获服务已在运行")
|