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
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
liumaolin commited on
Commit ·
2c7e742
1
Parent(s): e3d17e2
更新音频任务处理逻辑,使用模型副本替代原始任务对象,以确保数据一致性和完整性。
Browse files
src/voice_dialogue/services/audio/generator.py
CHANGED
|
@@ -103,4 +103,4 @@ class TTSAudioGenerator(BaseThread, TaskStatusMixin):
|
|
| 103 |
voice_task.tts_generated_sentence_audio = tts_generated_sentence_audio
|
| 104 |
voice_task.tts_end_time = time.time()
|
| 105 |
|
| 106 |
-
self.audio_output_queue.put(voice_task)
|
|
|
|
| 103 |
voice_task.tts_generated_sentence_audio = tts_generated_sentence_audio
|
| 104 |
voice_task.tts_end_time = time.time()
|
| 105 |
|
| 106 |
+
self.audio_output_queue.put(voice_task.model_copy())
|
src/voice_dialogue/services/speech/monitor.py
CHANGED
|
@@ -291,7 +291,7 @@ class SpeechStateMonitor(BaseThread):
|
|
| 291 |
# 8. 检查是否需要发送语音任务
|
| 292 |
if self._should_send_voice_task(is_audio_sent_for_processing):
|
| 293 |
voice_task = self._create_voice_task(audio_frames)
|
| 294 |
-
self.user_voice_queue.put(voice_task)
|
| 295 |
|
| 296 |
# 更新状态
|
| 297 |
is_audio_sent_for_processing = True
|
|
|
|
| 291 |
# 8. 检查是否需要发送语音任务
|
| 292 |
if self._should_send_voice_task(is_audio_sent_for_processing):
|
| 293 |
voice_task = self._create_voice_task(audio_frames)
|
| 294 |
+
self.user_voice_queue.put(voice_task.model_copy(deep=True))
|
| 295 |
|
| 296 |
# 更新状态
|
| 297 |
is_audio_sent_for_processing = True
|
src/voice_dialogue/services/speech/recognizer.py
CHANGED
|
@@ -38,7 +38,6 @@ class ASRWorker(BaseThread, PerformanceLogMixin):
|
|
| 38 |
except Empty:
|
| 39 |
continue
|
| 40 |
|
| 41 |
-
|
| 42 |
voice_task.language = self.language
|
| 43 |
voice_task.whisper_start_time = time.time()
|
| 44 |
|
|
@@ -47,16 +46,16 @@ class ASRWorker(BaseThread, PerformanceLogMixin):
|
|
| 47 |
if not transcribed_text.strip():
|
| 48 |
voice_state_manager.reset_task_id()
|
| 49 |
continue
|
| 50 |
-
|
| 51 |
self.log_task_user_question(voice_task)
|
| 52 |
|
| 53 |
voice_task.whisper_end_time = time.time()
|
| 54 |
|
| 55 |
task_id = voice_task.id
|
| 56 |
-
cached_user_question = self.cached_user_questions.get(task_id, [])
|
| 57 |
-
cached_user_question.append(transcribed_text)
|
| 58 |
|
|
|
|
| 59 |
if voice_task.is_over_audio_frames_threshold:
|
|
|
|
| 60 |
self.cached_user_questions[task_id] = cached_user_question
|
| 61 |
|
| 62 |
answer_id = voice_task.answer_id
|
|
@@ -72,4 +71,4 @@ class ASRWorker(BaseThread, PerformanceLogMixin):
|
|
| 72 |
voice_task.transcribed_text = ' '.join(cached_user_question) if cached_user_question else transcribed_text
|
| 73 |
|
| 74 |
voice_task.user_voice = []
|
| 75 |
-
self.transcribed_text_queue.put(voice_task)
|
|
|
|
| 38 |
except Empty:
|
| 39 |
continue
|
| 40 |
|
|
|
|
| 41 |
voice_task.language = self.language
|
| 42 |
voice_task.whisper_start_time = time.time()
|
| 43 |
|
|
|
|
| 46 |
if not transcribed_text.strip():
|
| 47 |
voice_state_manager.reset_task_id()
|
| 48 |
continue
|
| 49 |
+
|
| 50 |
self.log_task_user_question(voice_task)
|
| 51 |
|
| 52 |
voice_task.whisper_end_time = time.time()
|
| 53 |
|
| 54 |
task_id = voice_task.id
|
|
|
|
|
|
|
| 55 |
|
| 56 |
+
cached_user_question = self.cached_user_questions.get(task_id, [])
|
| 57 |
if voice_task.is_over_audio_frames_threshold:
|
| 58 |
+
cached_user_question.append(transcribed_text)
|
| 59 |
self.cached_user_questions[task_id] = cached_user_question
|
| 60 |
|
| 61 |
answer_id = voice_task.answer_id
|
|
|
|
| 71 |
voice_task.transcribed_text = ' '.join(cached_user_question) if cached_user_question else transcribed_text
|
| 72 |
|
| 73 |
voice_task.user_voice = []
|
| 74 |
+
self.transcribed_text_queue.put(voice_task.model_copy())
|