pi-voice-input 0.2.2 → 0.2.4
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 +10 -2
- package/extensions/voice-input.ts +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ System dependency, one of:
|
|
|
43
43
|
- `pw-record` from PipeWire tools, preferred
|
|
44
44
|
- `arecord` from alsa-utils, fallback
|
|
45
45
|
|
|
46
|
-
## Install
|
|
46
|
+
## Install / Update
|
|
47
47
|
|
|
48
48
|
Install the published package with pi:
|
|
49
49
|
|
|
@@ -51,6 +51,14 @@ Install the published package with pi:
|
|
|
51
51
|
pi install npm:pi-voice-input
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
Update to the latest published version:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pi update npm:pi-voice-input
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
If pi is already running, restart pi after installing or updating. `/reload` may not replace code that was already loaded by the current pi process.
|
|
61
|
+
|
|
54
62
|
## Providers
|
|
55
63
|
|
|
56
64
|
The extension is structured around a provider boundary: recording, editor insertion, and command handling are generic; ASR transport/protocol logic is provider-specific.
|
|
@@ -135,7 +143,7 @@ Slash commands:
|
|
|
135
143
|
- The default ASR segment size is intentionally larger than realtime packet sizes because this workflow sends already-recorded audio.
|
|
136
144
|
- The transcript is inserted into the editor only; it is not submitted automatically.
|
|
137
145
|
- When `polishModel` is set, polishing uses the unsent editor draft and recent session messages as context, but outputs only the refined voice text. The final text is still pasted at the current cursor position without replacing the draft.
|
|
138
|
-
- While recording, the status line
|
|
146
|
+
- While recording, the status line shows `● Mic on: [device name]` in the current theme accent color.
|
|
139
147
|
|
|
140
148
|
## Development
|
|
141
149
|
|
|
@@ -314,7 +314,7 @@ function recordingDeviceName(config: VoiceConfig, recorderExecutable: string): s
|
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
function recordingStatusText(deviceName: string): string {
|
|
317
|
-
return
|
|
317
|
+
return `● Mic on: ${deviceName || "default microphone"}`;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
function readState(config: VoiceConfig): RecordingState | null {
|
|
@@ -905,7 +905,7 @@ async function startRecording(ctx: ExtensionContext) {
|
|
|
905
905
|
if (existing && pidAlive(existing.pid)) {
|
|
906
906
|
const deviceName = existing.deviceName || recordingDeviceName(config, commandExists("pw-record") ? "pw-record" : "arecord");
|
|
907
907
|
ctx.ui.notify(`Already recording: pid=${existing.pid}. ${recordingStatusText(deviceName)}`, "warning");
|
|
908
|
-
ctx.ui.setStatus("voice-input", ctx.ui.theme.fg("
|
|
908
|
+
ctx.ui.setStatus("voice-input", ctx.ui.theme.fg("accent", recordingStatusText(deviceName)));
|
|
909
909
|
return;
|
|
910
910
|
}
|
|
911
911
|
if (existing) clearState(config);
|
|
@@ -936,7 +936,7 @@ async function startRecording(ctx: ExtensionContext) {
|
|
|
936
936
|
deviceName,
|
|
937
937
|
});
|
|
938
938
|
|
|
939
|
-
ctx.ui.setStatus("voice-input", ctx.ui.theme.fg("
|
|
939
|
+
ctx.ui.setStatus("voice-input", ctx.ui.theme.fg("accent", recordingStatusText(deviceName)));
|
|
940
940
|
ctx.ui.notify(`${recordingStatusText(deviceName)}. Press Ctrl+Shift+R again to stop/transcribe.`, "info");
|
|
941
941
|
}
|
|
942
942
|
|