@tychenjiajun/pi-voice 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,6 +4,14 @@ Speech-to-text for Pi — on-device model or OpenAI-compatible remote ASR, with
4
4
 
5
5
  Press a keyboard shortcut, talk, and the resulting transcript will be put directly into your chat.
6
6
 
7
+ ![pi-voice promo card](https://raw.githubusercontent.com/tychenjiajun/pi-voice/remote-asr-backend/assets/preview.png)
8
+
9
+ ![pi-voice demo: dictate, transcript lands in your session](https://raw.githubusercontent.com/tychenjiajun/pi-voice/remote-asr-backend/assets/demo.gif)
10
+
11
+ [![pi-extension](https://img.shields.io/badge/pi-extension-7c3aed)](https://pi.dev/docs/latest/packages) [![npm version](https://img.shields.io/npm/v/%40tychenjiajun%2Fpi-voice)](https://www.npmjs.com/package/@tychenjiajun/pi-voice) [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
12
+
13
+ Browse more Pi packages in the [pi.dev packages gallery](https://pi.dev/packages/@tychenjiajun/pi-voice) and read the [Pi packages documentation](https://pi.dev/docs/latest/packages).
14
+
7
15
  > **Fork notice.** `@tychenjiajun/pi-voice` is a fork of [`@earendil-works/pi-voice`](https://github.com/earendil-works/pi-voice) that adds a remote ASR backend (any OpenAI-compatible `input_audio` chat-completions endpoint) in an exclusive local-only or remote-only setup, plus compaction-style post-processing that refines a transcript with Pi's own model. It is published independently under a personal npm scope. See the [changelog](#changelog) for what changed.
8
16
 
9
17
  ## Install
@@ -114,6 +122,24 @@ The legacy `PI_TRANSCRIBE_FFMPEG_PATH` variable remains supported when `PI_VOICE
114
122
 
115
123
  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 a mode and, in local mode, confirm the download of a local model.
116
124
 
125
+ ## FAQ
126
+
127
+ ### What models does it support?
128
+
129
+ Local mode downloads GGUF ASR models from a built-in catalog — Whisper (e.g. `whisper-medium`), Parakeet, Canary, Nemotron, Qwen3-ASR and more, picked via a fuzzy-searchable `/voice-settings` model picker. Remote mode works with **any** endpoint that speaks the OpenAI chat-completions `input_audio` dialect (OpenAI, Groq, self-hosted servers, …).
130
+
131
+ ### Does audio leave my machine?
132
+
133
+ Not unless you configure remote mode. With a local model, recording and transcription happen entirely on-device. If you switch **Transcription backend** to **Remote ASR**, the 16 kHz mono WAV clip is sent to *your* endpoint — the API key is read from an env var you name and is never stored in settings.
134
+
135
+ ### How is this different from `@earendil-works/pi-voice`?
136
+
137
+ This fork adds a remote ASR backend (exclusive local-only or remote-only setup) and compaction-style post-processing that refines transcripts with Pi's own model — stripping filler words, fixing punctuation and capitalisation. See the [changelog](#changelog).
138
+
139
+ ### Do I need FFmpeg?
140
+
141
+ Only for the `transcribe_file` tool (transcribing existing audio/video files). Microphone dictation works without it. Install hints for macOS, Debian/Ubuntu and Windows are in [File transcription and FFmpeg](#file-transcription-and-ffmpeg).
142
+
117
143
  ## Changelog
118
144
 
119
145
  ### 0.8.0
Binary file
Binary file
Binary file
@@ -0,0 +1,47 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1600" height="1000" viewBox="0 0 1600 1000" role="img" aria-label="@tychenjiajun/pi-voice promo card">
2
+ <defs>
3
+ <linearGradient id="accent" x1="0" y1="0" x2="1" y2="0">
4
+ <stop offset="0" stop-color="#7c3aed"/>
5
+ <stop offset="1" stop-color="#a78bfa"/>
6
+ </linearGradient>
7
+ <radialGradient id="glow" cx="0.5" cy="1" r="0.9">
8
+ <stop offset="0" stop-color="#7c3aed" stop-opacity="0.30"/>
9
+ <stop offset="0.6" stop-color="#7c3aed" stop-opacity="0.10"/>
10
+ <stop offset="1" stop-color="#7c3aed" stop-opacity="0"/>
11
+ </radialGradient>
12
+ <pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse">
13
+ <path d="M50 0H0v50" fill="none" stroke="#ffffff" stroke-opacity="0.05" stroke-width="1"/>
14
+ </pattern>
15
+ </defs>
16
+
17
+ <rect width="1600" height="1000" fill="#0d0d12"/>
18
+ <rect width="1600" height="1000" fill="url(#grid)"/>
19
+ <rect width="1600" height="1000" fill="url(#glow)"/>
20
+
21
+ <!-- corner labels -->
22
+ <rect x="140" y="120" rx="8" width="300" height="56" fill="#7c3aed" fill-opacity="0.18" stroke="#7c3aed"/>
23
+ <text x="290" y="158" text-anchor="middle" font-family="ui-monospace, Menlo, monospace" font-size="30" fill="#c4b5fd">pi-extension</text>
24
+ <text x="1460" y="158" text-anchor="end" font-family="ui-monospace, Menlo, monospace" font-size="30" fill="#8b8b9e">pi.dev/packages</text>
25
+
26
+ <!-- mic glyph -->
27
+ <g transform="translate(800 268)">
28
+ <circle cx="0" cy="0" r="64" fill="#7c3aed" fill-opacity="0.18" stroke="#7c3aed" stroke-width="4"/>
29
+ <rect x="-16" y="-44" width="32" height="56" rx="16" fill="#a78bfa"/>
30
+ <path d="M-32 -2 a32 32 0 0 0 64 0" fill="none" stroke="#a78bfa" stroke-width="6" stroke-linecap="round"/>
31
+ <line x1="0" y1="30" x2="0" y2="52" stroke="#a78bfa" stroke-width="6" stroke-linecap="round"/>
32
+ </g>
33
+
34
+ <!-- name -->
35
+ <text x="800" y="480" text-anchor="middle" font-family="ui-monospace, Menlo, monospace" font-size="132" font-weight="700" fill="#ffffff">pi-voice</text>
36
+ <text x="800" y="540" text-anchor="middle" font-family="ui-monospace, Menlo, monospace" font-size="34" fill="#8b8b9e">@tychenjiajun</text>
37
+
38
+ <!-- tagline -->
39
+ <text x="800" y="620" text-anchor="middle" font-family="system-ui, sans-serif" font-size="44" fill="#c9c9d4">Speak &#8212; transcript lands in your chat</text>
40
+
41
+ <!-- install pill -->
42
+ <rect x="270" y="690" rx="14" width="1060" height="92" fill="#16161d" stroke="url(#accent)" stroke-width="3"/>
43
+ <text x="800" y="749" text-anchor="middle" font-family="ui-monospace, Menlo, monospace" font-size="40" fill="#a78bfa">$ pi install npm:@tychenjiajun/pi-voice</text>
44
+
45
+ <!-- accent bar -->
46
+ <rect x="440" y="860" width="720" height="10" rx="5" fill="url(#accent)"/>
47
+ </svg>
Binary file
@@ -0,0 +1,37 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="630" viewBox="0 0 1200 630" role="img" aria-label="@tychenjiajun/pi-voice social card">
2
+ <defs>
3
+ <linearGradient id="accent" x1="0" y1="0" x2="1" y2="0">
4
+ <stop offset="0" stop-color="#7c3aed"/>
5
+ <stop offset="1" stop-color="#a78bfa"/>
6
+ </linearGradient>
7
+ <radialGradient id="glow" cx="0.5" cy="1" r="0.9">
8
+ <stop offset="0" stop-color="#7c3aed" stop-opacity="0.30"/>
9
+ <stop offset="0.6" stop-color="#7c3aed" stop-opacity="0.10"/>
10
+ <stop offset="1" stop-color="#7c3aed" stop-opacity="0"/>
11
+ </radialGradient>
12
+ <pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse">
13
+ <path d="M50 0H0v50" fill="none" stroke="#ffffff" stroke-opacity="0.05" stroke-width="1"/>
14
+ </pattern>
15
+ </defs>
16
+
17
+ <rect width="1200" height="630" fill="#0d0d12"/>
18
+ <rect width="1200" height="630" fill="url(#grid)"/>
19
+ <rect width="1200" height="630" fill="url(#glow)"/>
20
+
21
+ <rect x="80" y="72" rx="8" width="260" height="50" fill="#7c3aed" fill-opacity="0.18" stroke="#7c3aed"/>
22
+ <text x="210" y="107" text-anchor="middle" font-family="ui-monospace, Menlo, monospace" font-size="27" fill="#c4b5fd">pi-extension</text>
23
+
24
+ <g transform="translate(600 218)">
25
+ <circle cx="0" cy="0" r="48" fill="#7c3aed" fill-opacity="0.18" stroke="#7c3aed" stroke-width="3"/>
26
+ <rect x="-12" y="-33" width="24" height="42" rx="12" fill="#a78bfa"/>
27
+ <path d="M-24 -2 a24 24 0 0 0 48 0" fill="none" stroke="#a78bfa" stroke-width="5" stroke-linecap="round"/>
28
+ <line x1="0" y1="22" x2="0" y2="39" stroke="#a78bfa" stroke-width="5" stroke-linecap="round"/>
29
+ </g>
30
+
31
+ <text x="600" y="360" text-anchor="middle" font-family="ui-monospace, Menlo, monospace" font-size="92" font-weight="700" fill="#ffffff">pi-voice</text>
32
+ <text x="600" y="406" text-anchor="middle" font-family="ui-monospace, Menlo, monospace" font-size="28" fill="#8b8b9e">@tychenjiajun/pi-voice</text>
33
+ <text x="600" y="462" text-anchor="middle" font-family="system-ui, sans-serif" font-size="36" fill="#c9c9d4">Speech-to-text for Pi &#8212; local model or remote ASR</text>
34
+
35
+ <rect x="216" y="510" rx="12" width="768" height="70" fill="#16161d" stroke="url(#accent)" stroke-width="3"/>
36
+ <text x="600" y="556" text-anchor="middle" font-family="ui-monospace, Menlo, monospace" font-size="29" fill="#a78bfa">$ pi install npm:@tychenjiajun/pi-voice</text>
37
+ </svg>
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@tychenjiajun/pi-voice",
3
- "version": "0.8.0",
4
- "description": "Speech-to-text for Pi (local model or OpenAI-compatible remote ASR, compaction-style post-processing)",
3
+ "version": "0.8.1",
4
+ "description": "Speech-to-text for the Pi coding agent: press a shortcut and dictate — transcripts land directly in your chat. Local models (Whisper, Parakeet) or any OpenAI-compatible remote ASR endpoint, with compaction-style post-processing that strips fillers.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/tychenjiajun/pi-voice.git"
10
10
  },
11
- "homepage": "https://github.com/tychenjiajun/pi-voice#readme",
11
+ "homepage": "https://pi.dev/packages/@tychenjiajun/pi-voice",
12
12
  "bugs": {
13
13
  "url": "https://github.com/tychenjiajun/pi-voice/issues"
14
14
  },
@@ -19,6 +19,7 @@
19
19
  "catalog/recommendations.json",
20
20
  "models/silero-vad-v6.2-F32.gguf",
21
21
  "models/README.md",
22
+ "assets",
22
23
  "README.md",
23
24
  "LICENSE"
24
25
  ],
@@ -31,7 +32,13 @@
31
32
  "voice",
32
33
  "dictation",
33
34
  "transcription",
34
- "speech-to-text"
35
+ "speech-to-text",
36
+ "asr",
37
+ "whisper",
38
+ "openai-compatible",
39
+ "voice-input",
40
+ "voice-control",
41
+ "local-model"
35
42
  ],
36
43
  "engines": {
37
44
  "node": ">=22"
@@ -47,7 +54,9 @@
47
54
  "pi": {
48
55
  "extensions": [
49
56
  "./index.ts"
50
- ]
57
+ ],
58
+ "image": "https://raw.githubusercontent.com/tychenjiajun/pi-voice/remote-asr-backend/assets/preview.png",
59
+ "video": "https://raw.githubusercontent.com/tychenjiajun/pi-voice/remote-asr-backend/assets/demo.mp4"
51
60
  },
52
61
  "peerDependencies": {
53
62
  "@earendil-works/pi-coding-agent": "*",