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 ·
bfefeb3
1
Parent(s): 8f823b0
Refactor core queue initialization: move queue definitions to `constants.py` and clean up redundant imports in `main.py` for better modularity.
Browse files
src/VoiceDialogue/main.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
import argparse
|
| 2 |
import time
|
| 3 |
import typing
|
| 4 |
-
from multiprocessing import Queue
|
| 5 |
from pathlib import Path
|
| 6 |
|
| 7 |
import uvicorn
|
|
@@ -14,6 +13,13 @@ from services.audio.audio_generator.models import tts_config_registry, TTSConfig
|
|
| 14 |
from services.audio.aec_audio_capture import EchoCancellingAudioCapture
|
| 15 |
from services.audio.audio_answer import TTSAudioGenerator
|
| 16 |
from services.audio.audio_player import AudioStreamPlayer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
from services.speech.speech_monitor import SpeechStateMonitor
|
| 18 |
from services.speech.asr_service import ASRWorker
|
| 19 |
from services.text.text_generator import LLMResponseGenerator
|
|
@@ -56,11 +62,6 @@ def launch_system(
|
|
| 56 |
该函数会阻塞运行,直到系统被外部停止或发生异常
|
| 57 |
"""
|
| 58 |
|
| 59 |
-
audio_frames_queue = Queue()
|
| 60 |
-
user_voice_queue = Queue()
|
| 61 |
-
transcribed_text_queue = Queue()
|
| 62 |
-
text_input_queue = Queue()
|
| 63 |
-
audio_output_queue = Queue()
|
| 64 |
threads = []
|
| 65 |
#
|
| 66 |
audio_frame_probe = EchoCancellingAudioCapture(audio_frames_queue=audio_frames_queue)
|
|
|
|
| 1 |
import argparse
|
| 2 |
import time
|
| 3 |
import typing
|
|
|
|
| 4 |
from pathlib import Path
|
| 5 |
|
| 6 |
import uvicorn
|
|
|
|
| 13 |
from services.audio.aec_audio_capture import EchoCancellingAudioCapture
|
| 14 |
from services.audio.audio_answer import TTSAudioGenerator
|
| 15 |
from services.audio.audio_player import AudioStreamPlayer
|
| 16 |
+
from services.core.constants import (
|
| 17 |
+
audio_frames_queue,
|
| 18 |
+
user_voice_queue,
|
| 19 |
+
transcribed_text_queue,
|
| 20 |
+
text_input_queue,
|
| 21 |
+
audio_output_queue
|
| 22 |
+
)
|
| 23 |
from services.speech.speech_monitor import SpeechStateMonitor
|
| 24 |
from services.speech.asr_service import ASRWorker
|
| 25 |
from services.text.text_generator import LLMResponseGenerator
|
|
|
|
| 62 |
该函数会阻塞运行,直到系统被外部停止或发生异常
|
| 63 |
"""
|
| 64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
threads = []
|
| 66 |
#
|
| 67 |
audio_frame_probe = EchoCancellingAudioCapture(audio_frames_queue=audio_frames_queue)
|
src/VoiceDialogue/services/core/constants.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import threading
|
| 2 |
import uuid
|
| 3 |
from collections import OrderedDict
|
|
@@ -27,6 +28,15 @@ SAMPLE_RATE_WINDOW_SIZE_MAPPING = {
|
|
| 27 |
DEFAULT_SAMPLE_RATE = 16000
|
| 28 |
DEFAULT_WINDOW_SIZE = 512
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
# ======================= 全局状态实例 =======================
|
| 31 |
|
| 32 |
# 语音状态管理器实例
|
|
|
|
| 1 |
+
import multiprocessing
|
| 2 |
import threading
|
| 3 |
import uuid
|
| 4 |
from collections import OrderedDict
|
|
|
|
| 28 |
DEFAULT_SAMPLE_RATE = 16000
|
| 29 |
DEFAULT_WINDOW_SIZE = 512
|
| 30 |
|
| 31 |
+
# ======================= 队列变量 =======================
|
| 32 |
+
|
| 33 |
+
# 音频处理相关队列
|
| 34 |
+
audio_frames_queue = multiprocessing.Queue()
|
| 35 |
+
user_voice_queue = multiprocessing.Queue()
|
| 36 |
+
transcribed_text_queue = multiprocessing.Queue()
|
| 37 |
+
text_input_queue = multiprocessing.Queue()
|
| 38 |
+
audio_output_queue = multiprocessing.Queue()
|
| 39 |
+
|
| 40 |
# ======================= 全局状态实例 =======================
|
| 41 |
|
| 42 |
# 语音状态管理器实例
|