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
- 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 new
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 new
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
liumaolin commited on
Commit ·
e7ebdb0
1
Parent(s): 94c7b78
Remove `SystemConfig` and `SystemStartRequest` models and clean up related API routes and background tasks for simplified system startup and management.
Browse files
src/VoiceDialogue/api/routes/system_routes.py
CHANGED
|
@@ -6,8 +6,7 @@ from fastapi import APIRouter, HTTPException, BackgroundTasks, Request
|
|
| 6 |
|
| 7 |
from ..core.service_factories import get_audio_capture_service_definition
|
| 8 |
from ..schemas.system_schemas import (
|
| 9 |
-
SystemStatusResponse,
|
| 10 |
-
SystemStartRequest, SystemResponse
|
| 11 |
)
|
| 12 |
|
| 13 |
logger = logging.getLogger(__name__)
|
|
@@ -17,7 +16,6 @@ router = APIRouter()
|
|
| 17 |
_system_status = {
|
| 18 |
"status": "stopped",
|
| 19 |
"start_time": None,
|
| 20 |
-
"config": None,
|
| 21 |
"active_sessions": 0
|
| 22 |
}
|
| 23 |
|
|
@@ -64,7 +62,6 @@ async def get_system_status(request: Request):
|
|
| 64 |
|
| 65 |
@router.post("/start", response_model=SystemResponse, summary="启动系统")
|
| 66 |
async def start_system(
|
| 67 |
-
request: SystemStartRequest,
|
| 68 |
fastapi_request: Request,
|
| 69 |
background_tasks: BackgroundTasks
|
| 70 |
):
|
|
@@ -80,12 +77,10 @@ async def start_system(
|
|
| 80 |
|
| 81 |
# 更新状态
|
| 82 |
_system_status["status"] = "starting"
|
| 83 |
-
_system_status["config"] = request.config
|
| 84 |
|
| 85 |
# 在后台启动系统
|
| 86 |
background_tasks.add_task(
|
| 87 |
_start_system_background,
|
| 88 |
-
request.config,
|
| 89 |
fastapi_request
|
| 90 |
)
|
| 91 |
|
|
@@ -141,7 +136,6 @@ async def stop_system(request: Request):
|
|
| 141 |
|
| 142 |
_system_status["status"] = "stopped"
|
| 143 |
_system_status["start_time"] = None
|
| 144 |
-
_system_status["config"] = None
|
| 145 |
_system_status["active_sessions"] = 0
|
| 146 |
|
| 147 |
return SystemResponse(
|
|
@@ -156,7 +150,6 @@ async def stop_system(request: Request):
|
|
| 156 |
|
| 157 |
@router.post("/restart", response_model=SystemResponse, summary="重启系统")
|
| 158 |
async def restart_system(
|
| 159 |
-
request: SystemStartRequest,
|
| 160 |
fastapi_request: Request,
|
| 161 |
background_tasks: BackgroundTasks
|
| 162 |
):
|
|
@@ -169,14 +162,14 @@ async def restart_system(
|
|
| 169 |
await stop_system(fastapi_request)
|
| 170 |
|
| 171 |
# 再启动
|
| 172 |
-
return await start_system(
|
| 173 |
|
| 174 |
except Exception as e:
|
| 175 |
logger.error(f"系统重启失败: {e}", exc_info=True)
|
| 176 |
raise HTTPException(status_code=500, detail=f"系统重启失败: {str(e)}")
|
| 177 |
|
| 178 |
|
| 179 |
-
async def _start_system_background(
|
| 180 |
"""
|
| 181 |
后台启动系统的实际逻辑 - 创建并启动audio_capture服务
|
| 182 |
"""
|
|
|
|
| 6 |
|
| 7 |
from ..core.service_factories import get_audio_capture_service_definition
|
| 8 |
from ..schemas.system_schemas import (
|
| 9 |
+
SystemStatusResponse, SystemResponse
|
|
|
|
| 10 |
)
|
| 11 |
|
| 12 |
logger = logging.getLogger(__name__)
|
|
|
|
| 16 |
_system_status = {
|
| 17 |
"status": "stopped",
|
| 18 |
"start_time": None,
|
|
|
|
| 19 |
"active_sessions": 0
|
| 20 |
}
|
| 21 |
|
|
|
|
| 62 |
|
| 63 |
@router.post("/start", response_model=SystemResponse, summary="启动系统")
|
| 64 |
async def start_system(
|
|
|
|
| 65 |
fastapi_request: Request,
|
| 66 |
background_tasks: BackgroundTasks
|
| 67 |
):
|
|
|
|
| 77 |
|
| 78 |
# 更新状态
|
| 79 |
_system_status["status"] = "starting"
|
|
|
|
| 80 |
|
| 81 |
# 在后台启动系统
|
| 82 |
background_tasks.add_task(
|
| 83 |
_start_system_background,
|
|
|
|
| 84 |
fastapi_request
|
| 85 |
)
|
| 86 |
|
|
|
|
| 136 |
|
| 137 |
_system_status["status"] = "stopped"
|
| 138 |
_system_status["start_time"] = None
|
|
|
|
| 139 |
_system_status["active_sessions"] = 0
|
| 140 |
|
| 141 |
return SystemResponse(
|
|
|
|
| 150 |
|
| 151 |
@router.post("/restart", response_model=SystemResponse, summary="重启系统")
|
| 152 |
async def restart_system(
|
|
|
|
| 153 |
fastapi_request: Request,
|
| 154 |
background_tasks: BackgroundTasks
|
| 155 |
):
|
|
|
|
| 162 |
await stop_system(fastapi_request)
|
| 163 |
|
| 164 |
# 再启动
|
| 165 |
+
return await start_system( fastapi_request, background_tasks)
|
| 166 |
|
| 167 |
except Exception as e:
|
| 168 |
logger.error(f"系统重启失败: {e}", exc_info=True)
|
| 169 |
raise HTTPException(status_code=500, detail=f"系统重启失败: {str(e)}")
|
| 170 |
|
| 171 |
|
| 172 |
+
async def _start_system_background(request: Request):
|
| 173 |
"""
|
| 174 |
后台启动系统的实际逻辑 - 创建并启动audio_capture服务
|
| 175 |
"""
|
src/VoiceDialogue/api/schemas/system_schemas.py
CHANGED
|
@@ -15,18 +15,6 @@ class SystemStatusResponse(BaseModel):
|
|
| 15 |
services_details: Optional[Dict[str, Any]] = Field(None, description="服务详细状态信息")
|
| 16 |
|
| 17 |
|
| 18 |
-
class SystemConfig(BaseModel):
|
| 19 |
-
"""系统配置"""
|
| 20 |
-
language: Optional[str] = Field(default="zh", description="系统语言")
|
| 21 |
-
sample_rate: Optional[int] = Field(default=16000, description="音频采样率")
|
| 22 |
-
enable_logging: Optional[bool] = Field(default=True, description="是否启用日志")
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
class SystemStartRequest(BaseModel):
|
| 26 |
-
"""系统启动请求"""
|
| 27 |
-
config: SystemConfig = Field(..., description="系统配置")
|
| 28 |
-
|
| 29 |
-
|
| 30 |
class SystemResponse(BaseModel):
|
| 31 |
"""系统操作响应"""
|
| 32 |
success: bool = Field(..., description="操作是否成功")
|
|
|
|
| 15 |
services_details: Optional[Dict[str, Any]] = Field(None, description="服务详细状态信息")
|
| 16 |
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
class SystemResponse(BaseModel):
|
| 19 |
"""系统操作响应"""
|
| 20 |
success: bool = Field(..., description="操作是否成功")
|