@earendil-works/pi-voice

中文文档
0.2.0发布于 2026/10/16MITES Module构建来源已验证近 30 天下载 2112

Local speech-to-text for Pi

原始使用文档
文档目录5 节
  1. Install
  2. Usage
  3. Upgrading from pi-transcribe
  4. File transcription and FFmpeg
  5. Developing & Building Pi Voice

Pi Voice

Local speech-to-text for Pi.

Press a keyboard shortcut, talk, and the resulting transcript will be put directly into your chat.

Install

Install the npm package:

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

If you prefer being on the development tip, you can install from GitHub:

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

Usage

The extension registers:

  • a configurable terminal shortcut (Ctrl+Alt+Z by default) to start and stop recording;
  • /voice, which does the same as the shortcut. While recording, Space also stops and transcribes, and Escape discards;
  • a transcribe_file tool that the agent can use to transcribe local audio or video files;
  • /voice-settings for preferred languages, model, transcription language, microphone, and shortcut settings.

/transcribe remains available as a compatibility alias for /voice-settings.

Upgrading from pi-transcribe

It's recommended to install Pi Voice via NPM. If you have an older install of pi-transcribe uninstall it via:

pi remove git:github.com/earendil-works/pi-transcribe

If you installed it into a project with -l, run pi remove -l git:github.com/earendil-works/pi-transcribe from that project instead. Then install Pi Voice with:

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

File transcription and FFmpeg

The agent can call transcribe_file for local audio or video files. Decoded audio is limited to 512 MiB (about 2.3 hours). File decoding requires the ffmpeg executable. Install FFmpeg with your system package manager if you don't already have it installed

# 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 Voice at it before starting Pi:

export PI_VOICE_FFMPEG_PATH=/path/to/ffmpeg

The legacy PI_TRANSCRIBE_FFMPEG_PATH variable remains supported when PI_VOICE_FFMPEG_PATH is not set.

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 /voice-settings once in the interactive TUI to choose and, after confirmation, download a local model.

Developing & Building Pi Voice

To develop or run it from a checkout:

git clone [email protected]:earendil-works/pi-voice.git
cd pi-voice
npm install --ignore-scripts
pi -e .

If you want to be able to re-run onboarding you can enable the debug env var when starting Pi. This enables the /voice-onboarding command.

PI_VOICE_DEBUG=1 pi -e /absolute/path/to/pi-voice

版本与发布记录

@earendil-works/pi-voice 共发布 2 个版本,首次发布于 2026/09/23;过去 12 个月发布了 2 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.2.0latest2026/10/1629 天前
0.1.02026/09/231 个月前

关于 @earendil-works/pi-voice 的常见问题

@earendil-works/pi-voice 是什么?

Local speech-to-text for Pi

如何安装 @earendil-works/pi-voice?

在项目目录运行 npm install @earendil-works/pi-voice,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typebox(*)、@earendil-works/pi-tui(*)、@earendil-works/pi-coding-agent(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@earendil-works/pi-voice 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/earendil-works__pi-voice 是否存在。

@earendil-works/pi-voice 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@earendil-works/pi-voice 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@earendil-works/pi-voice 可以商用吗?

@earendil-works/pi-voice 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@earendil-works/pi-voice 的下载量有多少?

根据 npm 官方下载统计,@earendil-works/pi-voice 在 2026/10/13 – 2026/11/11 这 30 天内被下载 2,112 次,日均约 70 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@earendil-works/pi-voice 还在维护吗?

最新版本 0.2.0 发布于 2026/10/16(29 天前);至今共发布 2 个版本,其中过去 12 个月发布了 2 个;首次发布于 2026/09/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。