- wtype - Wayland 文本注入
- sounddevice - 实时录音
- qwen-asr - 语音识别 (Qwen3-ASR-0.6B)
- pygame - OSD 波形显示
cd ~/code/ttsinput
uv sync# 启动守护进程 (首次运行或开机时)
uv --directory ~/code/ttsinput/ run voice_input --daemon
# 开始录音
uv --directory ~/code/ttsinput/ run voice_input --start
# 停止录音并注入文字
uv --directory ~/code/ttsinput/ run voice_input --stop编辑 ~/.config/hypr/hyprland.conf:
bindo = , F4, exec, uv --directory ~/code/ttsinput/ run voice_input --start
bindr = , F4, exec, uv --directory ~/code/ttsinput/ run voice_input --stop
编辑 ~/code/ttsinput/config.yaml:
asr:
model: "Qwen/Qwen3-ASR-0.6B"
language: "Chinese"
dtype: "float16"
device: "cuda:0"
max_batch_size: 1# 测试文本注入
echo "测试文字" | wtype -
# 查看 GPU 内存
nvidia-smi