pi-voice README

The project's README from github.com/earendil-works/pi-voice. As one markdown file: README.md.

pi-transcribe

Local speech-to-text dictation for Pi.

Install

Install directly from GitHub:

pi install ssh://[email protected]/earendil-works/pi-transcribe

After the first npm release, it can also be installed with:

pi install npm:@earendil-works/pi-transcribe

Usage

The extension registers:

To develop or run it from a checkout:

npm install --ignore-scripts
pi -e /absolute/path/to/pi-transcribe

While iterating on setup, enable the debug-only onboarding command when starting Pi:

PI_TRANSCRIBE_DEBUG=1 pi -e /absolute/path/to/pi-transcribe

Then run /transcribe-onboarding to replay the complete onboarding flow. The command is not registered unless PI_TRANSCRIBE_DEBUG=1. Canceling before selecting a model leaves the current configuration unchanged; model selections are applied immediately.

Press the shortcut while Pi has focus, speak, then press it again. A live level meter appears above the editor while recording. Esc cancels. Audio is transcribed locally and inserted at the editor cursor. Streaming-capable models process roughly 500 ms audio chunks while recording; other models use the complete recording after it stops. The shortcut is a Pi terminal binding, not a global OS hotkey.

File transcription and FFmpeg

The agent can call transcribe_file for local audio or video files. Transcription jobs share one loaded model; queued files reuse it, while microphone dictation runs before waiting file jobs after any active job finishes. To bound memory use, at most two file operations are admitted at once, only one FFmpeg decoder runs at a time, and decoded audio is limited to 128 MiB (about 35 minutes). File decoding requires the ffmpeg executable; microphone dictation does not. Install FFmpeg with your system package manager:

# macOS with Homebrew
brew install ffmpeg

# Debian or Ubuntu
sudo apt install ffmpeg

# Windows with winget
winget install Gyan.FFmpeg

If FFmpeg is installed outside PATH, point pi-transcribe at it before starting Pi:

export PI_TRANSCRIBE_FFMPEG_PATH=/path/to/ffmpeg

When FFmpeg is unavailable, transcribe_file reports platform-specific guidance to the agent. The agent should ask before running a package-manager command. Model setup is still explicit: run /transcribe once in the interactive TUI to choose and, after confirmation, download a local model.

pi-voice (earendil-works/pi-voice)

Searching Database…

这是什么?这是 Pi 编程助手的语音转文字扩展:按下快捷键,开口说话,转写结果就会插入到你编辑器的光标处。所有转写都在你自己的电脑上本地完成。
这是一个独立的软件,还是需要接入其他工具?它以扩展的形式接入 Pi,不是独立软件。它会添加一个录音快捷键、一个用于设置的 /transcribe 命令,以及一个叫 transcribefile 的工具,助手可以调用它来处理本地的音频或视频文件。
怎么安装设置?直接从 GitHub 安装(npm 发布版已在计划中),然后在 Pi 的交互式 TUI 里运行一次 /transcribe,选择一个模型,经你确认后下载。
除了扩展本身,我还需要安装什么?需要 Node.js 22 或更新版本。只有转写音频和视频文件时才需要 FFmpeg——对着麦克风听写不需要它;如果 FFmpeg 不在 PATH 里,你可以在启动 Pi 之前把它的路径指给 pi-transcribe。
我能从系统里的任何软件开始录音吗?不能——这个快捷键是 Pi 终端里的绑定,不是系统级的全局热键,所以只有在 Pi 获得焦点时才能开始录音。
我的声音会传到我的电脑之外吗?不会:音频用你在 TUI 中确认后下载的模型在本地转写。唯一涉及网络的步骤就是那一次性的模型下载。
助手能自己转写音频文件吗?可以,通过它的 transcribefile 工具。所有任务共用一个已加载的模型,麦克风听写的优先级更高,会在当前文件任务结束后立即处理;文件任务最多同时运行两个,共用一个 FFmpeg 解码器,解码上限为 128 MiB(约 35 分钟)。
是不是所有模型都能在我还在说话时就开始转写?不是——支持流式处理的模型会在录音过程中以大约 500 毫秒的分块进行处理,而其他模型要等你停止说话后才转写完整的录音。
如果设置过程中出了问题,有没有办法重新走一遍设置流程?有,但仅用于调试:用 PITRANSCRIBEDEBUG=1 启动 Pi,然后运行 /transcribe-onboarding。在选好模型之前取消的话,你当前的配置不会改变。
Size
1.5 MB
Stars
302
Updated
CommitOct 16
Age
2mo
Commits · 90 Days