Metadata-Version: 2.4
Name: daobidao
Version: 1.0.5
Summary: 叨逼叨 - 跨平台本地语音输入工具(中英日韩粤,Qwen3-ASR ONNX 本地推理)
Project-URL: Homepage, https://github.com/pkulijing/daobidao
Project-URL: Repository, https://github.com/pkulijing/daobidao
Project-URL: Issues, https://github.com/pkulijing/daobidao/issues
Author-email: pkuyplijing@gmail.com
License: MIT
Keywords: asr,daobidao,modelscope,qwen3-asr,speech-recognition,stt,voice-input
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Environment :: MacOS X
Classifier: Environment :: X11 Applications
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: Chinese (Simplified)
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Requires-Python: <3.13,>=3.12.13
Requires-Dist: evdev>=1.7.0; sys_platform == 'linux'
Requires-Dist: modelscope>=1.35.4
Requires-Dist: numpy>=1.24.0
Requires-Dist: onnxruntime>=1.24.4
Requires-Dist: packaging>=23.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: pygobject>=3.56.2; sys_platform == 'linux'
Requires-Dist: pynput>=1.7.6; sys_platform == 'darwin'
Requires-Dist: pyobjc-framework-cocoa>=10.0; sys_platform == 'darwin'
Requires-Dist: pystray>=0.19.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: sounddevice>=0.4.6
Requires-Dist: soundfile>=0.13.1
Requires-Dist: structlog>=24.0
Requires-Dist: tokenizers>=0.20
Description-Content-Type: text/markdown

**中文** | [English](README.en.md)

# 叨逼叨 (Daobidao)

[![Build](https://github.com/pkulijing/daobidao/actions/workflows/build.yml/badge.svg)](https://github.com/pkulijing/daobidao/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/pkulijing/daobidao/branch/master/graph/badge.svg)](https://codecov.io/gh/pkulijing/daobidao)
[![PyPI](https://img.shields.io/pypi/v/daobidao.svg)](https://pypi.org/project/daobidao/)

跨平台本地语音输入工具 —— 按住快捷键说话，松开后自动识别并输入到当前窗口。完全离线，无需联网。

基于 [Qwen3-ASR](https://www.modelscope.cn/models/zengshuishui/Qwen3-ASR-onnx) + `onnxruntime` 推理，支持中/英/日/韩/粤等多语种，自带标点和大小写。支持 **macOS** 和 **Linux (X11)**。

## 安装

```bash
curl -LsSf https://raw.githubusercontent.com/pkulijing/daobidao/master/install.sh | sh
```

脚本自动安装所有依赖、下载模型(~990 MB)，装完即用。重复执行安全。

<details>
<summary>手动安装</summary>

**macOS:**

```bash
brew install portaudio
uv tool install daobidao
daobidao --init   # 下载模型 + 安装 .app bundle
```

首次运行需在「系统设置 > 隐私与安全性」中授予**辅助功能**和**麦克风**权限。

**Linux (Ubuntu 24.04+ / Debian 13+):**

```bash
sudo apt install xdotool xclip pulseaudio-utils libportaudio2 \
                 libgirepository-2.0-dev libcairo2-dev gir1.2-gtk-3.0 \
                 gir1.2-ayatanaappindicator3-0.1
sudo usermod -aG input $USER && newgrp input
uv tool install daobidao
daobidao --init   # 下载模型
```

**从源码:**

```bash
git clone https://github.com/pkulijing/daobidao && cd daobidao
bash scripts/setup.sh
uv run daobidao
```

</details>

## 使用

1. 启动后按住快捷键开始录音（macOS 默认右 Command，Linux 默认右 Ctrl）
2. 说话，松开快捷键
3. 识别结果自动输入到光标位置

```bash
daobidao -k KEY_FN        # 自定义快捷键
daobidao --help           # 更多选项
```

启动后自动打开浏览器设置页，也可通过系统托盘访问。支持在设置页切换模型大小（0.6B / 1.7B）、快捷键、界面语言等。

## License

MIT
