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 ·
aa586b2
1
Parent(s): d673573
Add PyInstaller hooks and spec file for project packaging.
Browse files
build/pyinstaller/hooks/hook-en_core_web_sm.py
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from PyInstaller.utils.hooks import collect_data_files, copy_metadata
|
| 2 |
+
|
| 3 |
+
datas = collect_data_files('en_core_web_sm')
|
| 4 |
+
datas += copy_metadata('en_core_web_sm')
|
build/pyinstaller/hooks/hook-voice_dialogue.py
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Voice Dialogue PyInstaller Hook
|
| 3 |
+
用于配置 Voice Dialogue 应用程序的 PyInstaller 打包规则
|
| 4 |
+
"""
|
| 5 |
+
|
| 6 |
+
import pathlib
|
| 7 |
+
|
| 8 |
+
from PyInstaller.utils.hooks import (
|
| 9 |
+
collect_submodules,
|
| 10 |
+
collect_data_files,
|
| 11 |
+
collect_system_data_files,
|
| 12 |
+
collect_dynamic_libs
|
| 13 |
+
)
|
| 14 |
+
|
| 15 |
+
# ============================================================================
|
| 16 |
+
# 路径配置
|
| 17 |
+
# ============================================================================
|
| 18 |
+
PROJECT_ROOT = pathlib.Path(__file__).parent.parent.parent.parent
|
| 19 |
+
ASSETS_ROOT = PROJECT_ROOT / "assets"
|
| 20 |
+
|
| 21 |
+
# ============================================================================
|
| 22 |
+
# 核心模块收集
|
| 23 |
+
# ============================================================================
|
| 24 |
+
# 收集主模块的所有子模块
|
| 25 |
+
hiddenimports = collect_submodules('voice_dialogue')
|
| 26 |
+
datas = collect_data_files('moyoyo_tts', include_py_files=True)
|
| 27 |
+
# 收集系统资源文件
|
| 28 |
+
datas += collect_system_data_files(ASSETS_ROOT.as_posix(), "assets")
|
| 29 |
+
|
| 30 |
+
# ============================================================================
|
| 31 |
+
# 第三方依赖配置
|
| 32 |
+
# ============================================================================
|
| 33 |
+
|
| 34 |
+
# AI/ML 相关依赖
|
| 35 |
+
ML_DEPENDENCIES = [
|
| 36 |
+
"llama_cpp",
|
| 37 |
+
"torch",
|
| 38 |
+
"transformers",
|
| 39 |
+
"pytorch_lightning",
|
| 40 |
+
"huggingface_hub",
|
| 41 |
+
"einops",
|
| 42 |
+
]
|
| 43 |
+
|
| 44 |
+
# 语音处理相关依赖
|
| 45 |
+
AUDIO_DEPENDENCIES = [
|
| 46 |
+
"librosa",
|
| 47 |
+
"soundfile",
|
| 48 |
+
"funasr_onnx",
|
| 49 |
+
"pywhispercpp",
|
| 50 |
+
"kokoro_onnx",
|
| 51 |
+
"playsound",
|
| 52 |
+
]
|
| 53 |
+
|
| 54 |
+
# 文本处理相关依赖
|
| 55 |
+
TEXT_PROCESSING_DEPENDENCIES = [
|
| 56 |
+
"jieba",
|
| 57 |
+
"jieba_fast",
|
| 58 |
+
"cn2an",
|
| 59 |
+
"g2p_en",
|
| 60 |
+
"pypinyin",
|
| 61 |
+
"misaki",
|
| 62 |
+
"opencc",
|
| 63 |
+
"wordsegment",
|
| 64 |
+
"LangSegment",
|
| 65 |
+
"en_core_web_sm",
|
| 66 |
+
"spacy",
|
| 67 |
+
"spacy_curated_transformers",
|
| 68 |
+
]
|
| 69 |
+
|
| 70 |
+
# Web/网络相关依赖
|
| 71 |
+
WEB_DEPENDENCIES = [
|
| 72 |
+
"fastapi",
|
| 73 |
+
"uvicorn",
|
| 74 |
+
"websockets",
|
| 75 |
+
"langchain",
|
| 76 |
+
"langchain_community",
|
| 77 |
+
]
|
| 78 |
+
|
| 79 |
+
# 系统相关依赖
|
| 80 |
+
SYSTEM_DEPENDENCIES = [
|
| 81 |
+
"AppKit", # macOS
|
| 82 |
+
"Foundation", # macOS
|
| 83 |
+
"ffmpeg",
|
| 84 |
+
]
|
| 85 |
+
|
| 86 |
+
# 其他依赖
|
| 87 |
+
OTHER_DEPENDENCIES = [
|
| 88 |
+
]
|
| 89 |
+
|
| 90 |
+
# 合并所有隐藏导入
|
| 91 |
+
hiddenimports.extend(
|
| 92 |
+
ML_DEPENDENCIES +
|
| 93 |
+
AUDIO_DEPENDENCIES +
|
| 94 |
+
TEXT_PROCESSING_DEPENDENCIES +
|
| 95 |
+
WEB_DEPENDENCIES +
|
| 96 |
+
SYSTEM_DEPENDENCIES +
|
| 97 |
+
OTHER_DEPENDENCIES
|
| 98 |
+
)
|
| 99 |
+
|
| 100 |
+
# ============================================================================
|
| 101 |
+
# 数据文件收集
|
| 102 |
+
# ============================================================================
|
| 103 |
+
|
| 104 |
+
# 需要收集数据文件的包配置
|
| 105 |
+
DATA_PACKAGES = [
|
| 106 |
+
("jieba_fast", {}),
|
| 107 |
+
("kokoro_onnx", {}),
|
| 108 |
+
("language_tags", {}),
|
| 109 |
+
("py3langid", {}),
|
| 110 |
+
("inflect", {"include_py_files": True}),
|
| 111 |
+
("g2p_en", {}),
|
| 112 |
+
("wordsegment", {}),
|
| 113 |
+
("espeakng_loader", {}),
|
| 114 |
+
("spacy", {"include_py_files": True}),
|
| 115 |
+
("misaki", {}),
|
| 116 |
+
]
|
| 117 |
+
|
| 118 |
+
# 收集数据文件
|
| 119 |
+
for package_name, kwargs in DATA_PACKAGES:
|
| 120 |
+
try:
|
| 121 |
+
datas += collect_data_files(package_name, **kwargs)
|
| 122 |
+
except Exception as e:
|
| 123 |
+
print(f"警告:无法收集包 {package_name} 的数据文件: {e}")
|
| 124 |
+
|
| 125 |
+
# ============================================================================
|
| 126 |
+
# 动态库收集
|
| 127 |
+
# ============================================================================
|
| 128 |
+
|
| 129 |
+
# 需要收集动态库的包
|
| 130 |
+
BINARY_PACKAGES = [
|
| 131 |
+
"llama_cpp",
|
| 132 |
+
]
|
| 133 |
+
|
| 134 |
+
binaries = []
|
| 135 |
+
for package_name in BINARY_PACKAGES:
|
| 136 |
+
try:
|
| 137 |
+
binaries += collect_dynamic_libs(package_name)
|
| 138 |
+
except Exception as e:
|
| 139 |
+
print(f"警告:无法收集包 {package_name} 的动态库: {e}")
|
build/pyinstaller/voice_dialogue.spec
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- mode: python ; coding: utf-8 -*-
|
| 2 |
+
import os
|
| 3 |
+
import pathlib
|
| 4 |
+
import sys
|
| 5 |
+
|
| 6 |
+
project_root = pathlib.Path(os.getcwd()).resolve()
|
| 7 |
+
main_path = project_root / "main.py"
|
| 8 |
+
build_path = project_root / "build"
|
| 9 |
+
build_pyinstaller_path = build_path / "pyinstaller"
|
| 10 |
+
|
| 11 |
+
source_code_root = project_root / "src"
|
| 12 |
+
third_party_root = project_root / "third_party"
|
| 13 |
+
|
| 14 |
+
if source_code_root.as_posix() not in sys.path:
|
| 15 |
+
sys.path.insert(0, source_code_root.as_posix())
|
| 16 |
+
|
| 17 |
+
if third_party_root.as_posix() not in sys.path:
|
| 18 |
+
sys.path.insert(0, third_party_root.as_posix())
|
| 19 |
+
|
| 20 |
+
a = Analysis(
|
| 21 |
+
[main_path.as_posix()],
|
| 22 |
+
pathex=[],
|
| 23 |
+
binaries=[],
|
| 24 |
+
datas=[
|
| 25 |
+
],
|
| 26 |
+
hiddenimports=[],
|
| 27 |
+
hookspath=[build_pyinstaller_path / "hooks"],
|
| 28 |
+
hooksconfig={},
|
| 29 |
+
runtime_hooks=[],
|
| 30 |
+
excludes=[],
|
| 31 |
+
noarchive=False,
|
| 32 |
+
optimize=0,
|
| 33 |
+
)
|
| 34 |
+
pyz = PYZ(a.pure)
|
| 35 |
+
|
| 36 |
+
exe = EXE(
|
| 37 |
+
pyz,
|
| 38 |
+
a.scripts,
|
| 39 |
+
[],
|
| 40 |
+
exclude_binaries=True,
|
| 41 |
+
name='voice_dialogue',
|
| 42 |
+
debug=False,
|
| 43 |
+
bootloader_ignore_signals=False,
|
| 44 |
+
strip=False,
|
| 45 |
+
upx=True,
|
| 46 |
+
console=False,
|
| 47 |
+
disable_windowed_traceback=False,
|
| 48 |
+
argv_emulation=False,
|
| 49 |
+
target_arch='arm64',
|
| 50 |
+
codesign_identity=None,
|
| 51 |
+
entitlements_file=None,
|
| 52 |
+
)
|
| 53 |
+
coll = COLLECT(
|
| 54 |
+
exe,
|
| 55 |
+
a.binaries,
|
| 56 |
+
a.datas,
|
| 57 |
+
strip=False,
|
| 58 |
+
upx=True,
|
| 59 |
+
upx_exclude=[],
|
| 60 |
+
name='voice_dialogue',
|
| 61 |
+
)
|
| 62 |
+
app = BUNDLE(
|
| 63 |
+
coll,
|
| 64 |
+
name='voice_dialogue.app',
|
| 65 |
+
icon=None,
|
| 66 |
+
bundle_identifier=None,
|
| 67 |
+
)
|