用户可借助该项目实现语音对话、文件管理、图片理解等桌面任务。它支持 OpenAI 兼容模型、语音输入输出、本地工具调用,可混合配置不同平台的 ASR、LLM 和 TTS 服务。
| Files | Last commit | Last update |
|---|---|---|
| 5 months ago | ||
| 6 months ago | ||
| 6 months ago | ||
| 5 months ago | ||
| 6 months ago | ||
| 5 months ago | ||
| 6 months ago | ||
| 6 months ago | ||
| 5 months ago | ||
| 6 months ago | ||
| 6 months ago | ||
| 6 months ago | ||
| 5 months ago | ||
| 5 months ago | ||
| 6 months ago | ||
| 6 months ago | ||
| 6 months ago |
NexaDesk
中文 | English
NexaDesk is a compact PyQt6 desktop AI assistant for OpenAI-compatible LLM endpoints, voice input, streaming speech output, screenshots, image understanding, file search, and local task tools.
Demo

You can also open the repository video file directly: demo/功能展示.mp4.
The screenshot below complements the animated demo by showing how local tool calls are presented in the chat UI, including execution feedback, status hints, and how the result is written back into the ongoing conversation.

The demo uses three locally deployed vLLM services:
- Base model:
gemma4-31b-it. - TTS:
qwen3-TTS-1.7B-Finetuned, fine-tuned from Qwen3-TTS-12Hz-1.7B-Base. The fine-tuning workflow follows Qwen3-TTS finetuning, using the Yae Miko voice subset fromGenshin_zhin the hoyoTTS dataset. - ASR: Qwen3-ASR-1.7B.
Advanced Tip
If you have a voice you especially like, you can fine-tune a custom TTS voice with the workflow above, then select the corresponding model and voice in NexaDesk's TTS settings. This lets voice conversation better match your preferences, whether you want it softer, livelier, or more suitable for everyday companionship.
Features
- OpenAI-compatible chat completions with streaming output.
- Multiple base-model endpoints with model detection through
/v1/models. - Voice conversation mode with long listening, ASR, LLM streaming, and TTS playback.
- Voice task mode that transcribes one utterance and sends it through the normal task/tool flow.
- ASR/TTS endpoint configuration with optional API keys, model detection, and TTS voice selection.
- Device selection for microphone and speaker output.
- Tool-oriented task mode for local file reading, directory listing, file content search, screenshots, command assistance, and code edits.
- Image reading and multimodal analysis through the local tool workflow.
- Patch review and task-plan confirmation before sensitive local edits.
- Alibaba Cloud Model Studio / Bailian adapter for base LLM, ASR, and TTS.
Quick Start
Install dependencies into the project-local .venv:
uv sync
Run the desktop app:
uv run python main.py
The app starts as a floating ball. Open the main window, click ⚙, then configure:
- Base model: URL, api-key, model detection, and add to endpoint list.
- ASR: URL, api-key, detect model.
- TTS: URL, api-key, detect models and voices, then choose model and voice from dropdowns.
To keep private API settings in a local environment file, copy the template and fill in your own values:
Copy-Item .env.example .env
.env is ignored by Git; never commit real API keys. Runtime UI configuration is still stored in vllm_endpoints.json. If .env provides API keys for the base model, ASR, or TTS, the app prefers those values and avoids writing those secrets back into vllm_endpoints.json.
Architecture
Voice conversation mode uses this pipeline:
Microphone -> ASR -> LLM -> TTS -> Speaker
The ASR, LLM, and TTS services are configured independently, so you can combine providers. For example, a local ASR service can transcribe speech, a Bailian or OpenAI-compatible LLM can answer, and a local TTS service can speak the result.
Voice conversation mode uses a dedicated system prompt. By default it is an optimistic, cheerful, lively, cute life assistant persona. To change the speaking style after installation, open ⚙ and edit 对话风格 / 提示词; leaving it empty restores the built-in default.
Packaging
See the full guides:
Prebuilt Windows installers are published on the GitHub Releases page:
The packaging files are:
NexaDesk.specbuild.ps1installer.iss
Windows packaging:
uv sync --all-groups
.\build.ps1
If Inno Setup ISCC is available in PATH, the script also creates:
output\NexaDesk_Setup.exe
Otherwise, PyInstaller output is created under dist\NexaDesk.exe.
OpenWebUI Configuration
NexaDesk can use the same OpenAI-compatible backend that OpenWebUI uses.
Example OpenWebUI settings:
- OpenAI API Base URL: your OpenAI-compatible
/v1endpoint - API Key: your backend key, or any placeholder if your local server does not require one
- Model: choose a model returned by
/v1/models
In NexaDesk:
- Base model URL: the same
/v1endpoint - api-key: same as OpenWebUI
- Click
检测, choose a model, then click添加.
For general users, we recommend deploying lightweight ASR and TTS models locally. TTS models can be fine-tuned to your preferred voice. The following information is required for local services like vLLM, SGLang, llama.cpp server, and LiteLLM:
GET /v1/models
POST /v1/chat/completions
API URL Examples
OpenAI-style hosted endpoint:
- Base model URL:
https://api.openai.com/v1 - api-key: your provider key
- Model: choose a model returned by
/v1/models
Local vLLM-style endpoint:
- Start your OpenAI-compatible local service, for example on
<host>:<port>. - Base model URL:
http://<host>:<port>/v1 - api-key: leave empty if the local service does not require authentication.
- Required endpoints:
GET /v1/modelsandPOST /v1/chat/completions.
OpenAI-compatible local ASR/TTS services can be mixed with the base model. ASR usually uses POST /v1/audio/transcriptions; audio-chat ASR deployments can use POST /v1/chat/completions with an audio_url content part.
Alibaba Cloud Bailian / Model Studio
Bailian supports OpenAI-compatible chat endpoints through DashScope compatible mode.
Base model example:
- URL:
https://dashscope.aliyuncs.com/compatible-mode/v1 - api-key: your DashScope API key
- Example model:
qwen-plus
You can also paste a Bailian console URL in NexaDesk; NexaDesk normalizes it to the DashScope compatible endpoint for API calls.
ASR example:
- URL:
https://dashscope.aliyuncs.com/compatible-mode/v1 - api-key: your DashScope API key
- Model:
qwen3-asr-flash
TTS example:
- URL:
https://dashscope.aliyuncs.com - api-key: your DashScope API key
- Model:
qwen3-tts-flash - Voice example:
Cherry
NexaDesk adapts Bailian TTS to DashScope's streaming multimodal generation API and decodes base64 audio chunks for playback.
NexaDesk detects ASR/TTS models through the configured /models endpoint when available. TTS voices are loaded into the voice dropdown; when the TTS model changes, NexaDesk refreshes the voice list for that model so unsupported stale voices are not kept selected.
Voice Modes
语: voice conversation mode. The microphone keeps listening, sends speech after silence, pauses while the model and TTS are speaking, then resumes.听: voice task mode. Records one utterance, transcribes it, and sends it like manual text input with tools enabled.
Voice conversation mode does not call tools. It only chats and sends final answer text to TTS.
Project Files
main.py: app entry point.nexus/app.py: main UI and workflow.nexus/voice.py: microphone, ASR, TTS, and audio playback workers.nexus/worker.py: streaming chat completion worker.nexus/tools/: local tool execution framework.docs/application_configuration.md: detailed configuration notes.
License
MIT License. See LICENSE.
References
- OpenAI API compatible schema: https://platform.openai.com/docs/api-reference
- OpenWebUI: https://github.com/open-webui/open-webui
- Alibaba Cloud Model Studio / Bailian: https://bailian.console.aliyun.com/
- Alibaba Cloud Model Studio documentation: https://help.aliyun.com/zh/model-studio/
- DashScope SDK and examples: https://github.com/dashscope/dashscope-sdk-python
- PyQt6: https://www.riverbankcomputing.com/software/pyqt/
- PyInstaller: https://pyinstaller.org/
- Inno Setup: https://jrsoftware.org/isinfo.php