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 ·
4e071d3
1
Parent(s): 4e2e3d8
Add `--disable-echo-cancellation` CLI option and update audio pipeline to support toggling echo cancellation and VAD
Browse files- main.py +1 -1
- src/voice_dialogue/cli/args.py +6 -0
- src/voice_dialogue/core/launcher.py +11 -2
main.py
CHANGED
|
@@ -79,7 +79,7 @@ VoiceDialogue - 语音对话系统
|
|
| 79 |
print(f"语言设置: {args.language}")
|
| 80 |
print(f"说话人: {args.speaker}")
|
| 81 |
print("正在启动命令行语音对话系统...")
|
| 82 |
-
launch_system(args.language, args.speaker)
|
| 83 |
|
| 84 |
elif args.mode == 'api':
|
| 85 |
launch_api_server(
|
|
|
|
| 79 |
print(f"语言设置: {args.language}")
|
| 80 |
print(f"说话人: {args.speaker}")
|
| 81 |
print("正在启动命令行语音对话系统...")
|
| 82 |
+
launch_system(args.language, args.speaker, args.disable_echo_cancellation)
|
| 83 |
|
| 84 |
elif args.mode == 'api':
|
| 85 |
launch_api_server(
|
src/voice_dialogue/cli/args.py
CHANGED
|
@@ -68,6 +68,12 @@ def create_argument_parser():
|
|
| 68 |
default='沈逸' if '沈逸' in available_speakers else (available_speakers[0] if available_speakers else '沈逸'),
|
| 69 |
help='TTS说话人 (默认: 沈逸)'
|
| 70 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
# API服务器模式参数
|
| 73 |
api_group = parser.add_argument_group('API服务器模式参数')
|
|
|
|
| 68 |
default='沈逸' if '沈逸' in available_speakers else (available_speakers[0] if available_speakers else '沈逸'),
|
| 69 |
help='TTS说话人 (默认: 沈逸)'
|
| 70 |
)
|
| 71 |
+
cli_group.add_argument(
|
| 72 |
+
'--disable-echo-cancellation',
|
| 73 |
+
action='store_true',
|
| 74 |
+
default=False,
|
| 75 |
+
help='禁用回声消除功能 (默认: 启用)'
|
| 76 |
+
)
|
| 77 |
|
| 78 |
# API服务器模式参数
|
| 79 |
api_group = parser.add_argument_group('API服务器模式参数')
|
src/voice_dialogue/core/launcher.py
CHANGED
|
@@ -25,7 +25,8 @@ from voice_dialogue.utils.logger import logger
|
|
| 25 |
|
| 26 |
def launch_system(
|
| 27 |
user_language: str,
|
| 28 |
-
speaker: str
|
|
|
|
| 29 |
) -> None:
|
| 30 |
"""
|
| 31 |
启动完整的语音对话系统
|
|
@@ -61,14 +62,22 @@ def launch_system(
|
|
| 61 |
threads = []
|
| 62 |
|
| 63 |
# 音频采集
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
audio_frame_probe.start()
|
| 66 |
threads.append(audio_frame_probe)
|
| 67 |
|
| 68 |
# 语音状态监测
|
|
|
|
|
|
|
| 69 |
user_voice_checker = SpeechStateMonitor(
|
| 70 |
audio_frame_queue=audio_frames_queue,
|
| 71 |
user_voice_queue=user_voice_queue,
|
|
|
|
| 72 |
)
|
| 73 |
user_voice_checker.start()
|
| 74 |
threads.append(user_voice_checker)
|
|
|
|
| 25 |
|
| 26 |
def launch_system(
|
| 27 |
user_language: str,
|
| 28 |
+
speaker: str,
|
| 29 |
+
disable_echo_cancellation: bool = False,
|
| 30 |
) -> None:
|
| 31 |
"""
|
| 32 |
启动完整的语音对话系统
|
|
|
|
| 62 |
threads = []
|
| 63 |
|
| 64 |
# 音频采集
|
| 65 |
+
enable_echo_cancellation = not disable_echo_cancellation
|
| 66 |
+
logger.info(f"Echo Cancellation: {enable_echo_cancellation}")
|
| 67 |
+
audio_frame_probe = AudioCapture(
|
| 68 |
+
audio_frames_queue=audio_frames_queue,
|
| 69 |
+
enable_echo_cancellation=enable_echo_cancellation
|
| 70 |
+
)
|
| 71 |
audio_frame_probe.start()
|
| 72 |
threads.append(audio_frame_probe)
|
| 73 |
|
| 74 |
# 语音状态监测
|
| 75 |
+
enable_vad = disable_echo_cancellation
|
| 76 |
+
logger.info(f"VAD: {enable_vad}")
|
| 77 |
user_voice_checker = SpeechStateMonitor(
|
| 78 |
audio_frame_queue=audio_frames_queue,
|
| 79 |
user_voice_queue=user_voice_queue,
|
| 80 |
+
enable_vad=enable_vad
|
| 81 |
)
|
| 82 |
user_voice_checker.start()
|
| 83 |
threads.append(user_voice_checker)
|