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
| # AECAudioStream | |
| ## 概述 | |
| AECAudioStream 是一个用于捕获系统音频输入并应用声学回声消除(AEC)过滤器的 Swift 库。它提供了一个便捷的接口,允许用户捕获音频数据、处理声学回声消除,并支持语音活动检测(VAD)功能。 | |
| ## 功能特点 | |
| - 音频捕获:从系统音频输入设备捕获音频数据 | |
| - 声学回声消除(AEC):通过内置过滤器消除回声 | |
| - 语音活动检测(VAD):检测是否有语音活动 | |
| - 灵活的音频处理:支持自定义音频处理回调 | |
| - 线程安全的音频数据队列管理 | |
| ## 系统要求 | |
| - macOS 操作系统 | |
| - Swift 5.0+ | |
| ## 编译方法 | |
| 使用以下命令编译生成动态库: | |
| ``` bash | |
| swiftc -emit-library -o libAudioCapture.dylib AECAudioStream.swift | |
| ``` | |
| ## 使用方法 | |
| ### 初始化 | |
| ``` swift | |
| // 创建一个采样率为16000的音频流实例 | |
| let audioStream = AECAudioStream(sampleRate: 16000) | |
| ``` | |
| ### 启动音频捕获 | |
| ``` swift | |
| // 启动音频流并启用回声消除 | |
| let audioBufferStream = try audioStream.startAudioStream(enableAEC: true) | |
| // 异步处理捕获的音频数据 | |
| Task { | |
| for try await pcmBuffer in audioBufferStream { | |
| // 处理音频数据 | |
| processAudioData(pcmBuffer) | |
| } | |
| } | |
| ``` | |
| ### 使用回调方式 | |
| ``` swift | |
| // 启动音频流并通过回调处理 | |
| try audioStream.startAudioStream(enableAEC: true) { buffer in | |
| // 通过回调处理音频数据 | |
| } | |
| ``` | |
| ### 启用语音活动检测(VAD) | |
| ``` swift | |
| // 启用VAD功能 | |
| try audioStream.toggleVoiceActivityDetection(enable: true) | |
| // 设置VAD状态变化的回调 | |
| audioStream.voiceActivityHandler = { isVoiceDetected in | |
| if isVoiceDetected { | |
| print("检测到语音活动") | |
| } else { | |
| print("未检测到语音活动") | |
| } | |
| } | |
| ``` | |
| ### 停止音频捕获 | |
| ``` swift | |
| // 停止音频单元 | |
| try audioStream.stopAudioUnit() | |
| ``` | |
| ## C 接口 | |
| 库提供了以下 C 接口函数,方便从其他语言调用: | |
| - `startRecord()`: 开始录音并将音频数据存入队列 | |
| - `stopRecord()`: 停止录音 | |
| - `getAudioData()`: 获取音频数据 | |
| - `freeAudioData()`: 释放音频数据缓冲区 | |
| - `isVoiceActive()`: 获取当前语音活动检测状态 | |
| ### C 接口使用示例 | |
| ``` c | |
| // 开始录音 | |
| startRecord(); | |
| // 获取音频数据 | |
| int size; | |
| uint8_t* audioData = getAudioData(&size); | |
| if (audioData != NULL && size > 0) { | |
| // 处理音频数据 | |
| processAudioData(audioData, size); | |
| // 处理完成后释放内存 | |
| freeAudioData(audioData); | |
| } | |
| // 停止录音 | |
| stopRecord(); | |
| ``` | |
| ## 类和组件 | |
| ### AECAudioStream | |
| 主要类,提供音频捕获和处理功能。 | |
| ### AudioDataQueue | |
| 线程安全的音频数据队列,用于存储捕获的音频数据。 | |
| ### AECAudioStreamError | |
| 定义可能抛出的错误类型。 | |
| ## 注意事项 | |
| - 确保在使用完毕后调用 `stopAudioUnit()` 以释放资源 | |
| - 使用 VAD 功能时需要适当的权限 | |
| - 使用 C 接口获取音频数据后,必须调用 `freeAudioData()` 释放内存 | |
| ## 许可证 | |
| [请在此处添加许可证信息] | |