pi-voice-input 0.1.2 → 0.1.3
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 +4 -80
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -43,18 +43,6 @@ Install the published package with pi:
|
|
|
43
43
|
pi install npm:pi-voice-input
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
To pin a specific version:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
pi install npm:pi-voice-input@0.1.0
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
If pi is already running, reload extensions after installation:
|
|
53
|
-
|
|
54
|
-
```text
|
|
55
|
-
/reload
|
|
56
|
-
```
|
|
57
|
-
|
|
58
46
|
## Providers
|
|
59
47
|
|
|
60
48
|
The extension is structured around a provider boundary: recording, editor insertion, and command handling are generic; ASR transport/protocol logic is provider-specific.
|
|
@@ -78,11 +66,11 @@ In pi, run:
|
|
|
78
66
|
|
|
79
67
|
Paste your VolcEngine Speech API key into the prompt. The extension saves it for future sessions and keeps it out of your project files.
|
|
80
68
|
|
|
81
|
-
|
|
69
|
+
You can get/manage the key here:
|
|
82
70
|
|
|
83
|
-
```text
|
|
84
71
|
https://console.volcengine.com/speech/new/setting/apikeys?projectName=default
|
|
85
|
-
|
|
72
|
+
|
|
73
|
+
The key URL is also shown inside pi when the key is missing, when you run `/voice key`, and in `/voice help`:
|
|
86
74
|
|
|
87
75
|
Then verify:
|
|
88
76
|
|
|
@@ -90,70 +78,6 @@ Then verify:
|
|
|
90
78
|
/voice config
|
|
91
79
|
```
|
|
92
80
|
|
|
93
|
-
You can get/manage the key here:
|
|
94
|
-
|
|
95
|
-
https://console.volcengine.com/speech/new/setting/apikeys?projectName=default
|
|
96
|
-
|
|
97
|
-
If `VOLC_API_KEY` is missing, the extension does not silently fail. It shows an error notification explaining:
|
|
98
|
-
|
|
99
|
-
- that the current provider API key is missing
|
|
100
|
-
- to run `/voice key`
|
|
101
|
-
- the VolcEngine API-key settings URL
|
|
102
|
-
- that `/voice config` can be used to verify detection
|
|
103
|
-
|
|
104
|
-
Manual fallback:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
mkdir -p ~/.pi/agent
|
|
108
|
-
cp .env.example ~/.pi/agent/voice-input.env
|
|
109
|
-
$EDITOR ~/.pi/agent/voice-input.env
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Configuration reference
|
|
113
|
-
|
|
114
|
-
Example:
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
# Required for the current provider. Usually set by /voice key.
|
|
118
|
-
VOLC_API_KEY=your_volcengine_speech_api_key
|
|
119
|
-
|
|
120
|
-
# Current provider: VolcEngine WebSocket ASR endpoint and resource
|
|
121
|
-
VOLC_WS_URL=wss://openspeech.bytedance.com/api/v3/sauc/bigmodel_nostream
|
|
122
|
-
VOLC_STREAM_RESOURCE_ID=volc.seedasr.sauc.duration
|
|
123
|
-
|
|
124
|
-
# Empty means auto-detect. Example: zh-CN.
|
|
125
|
-
ASR_LANGUAGE=
|
|
126
|
-
|
|
127
|
-
# Optional contextual prompt for ASR.
|
|
128
|
-
ASR_PROMPT=
|
|
129
|
-
|
|
130
|
-
# Faster for post-recording batch transcription. Use 200 for realtime-like packet size.
|
|
131
|
-
STREAM_SEGMENT_MS=5000
|
|
132
|
-
ASR_REQUEST_TIMEOUT_MS=90000
|
|
133
|
-
|
|
134
|
-
# Empty means use PipeWire's default source.
|
|
135
|
-
RECORDER_TARGET=
|
|
136
|
-
RECORDING_FINALIZE_DELAY=0.1
|
|
137
|
-
|
|
138
|
-
# Storage for recordings, logs, and state.
|
|
139
|
-
VOICE_INPUT_HOME=~/.pi/agent/voice-input
|
|
140
|
-
RECORDINGS_DIR=recordings
|
|
141
|
-
RECORDER_STATE=recording.json
|
|
142
|
-
RECORDER_LOG_DIR=logs
|
|
143
|
-
|
|
144
|
-
# Shortcut. Default: ctrl+shift+r
|
|
145
|
-
VOICE_INPUT_SHORTCUT=ctrl+shift+r
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Config loading order, later values override earlier ones:
|
|
149
|
-
|
|
150
|
-
1. `~/.pi/agent/voice-input.env`
|
|
151
|
-
2. package-local `.env`
|
|
152
|
-
3. current-working-directory `.env`
|
|
153
|
-
4. shell environment variables
|
|
154
|
-
|
|
155
|
-
Do not commit real credentials. Prefer `/voice key`, or keep private local values in `.env` or `~/.pi/agent/voice-input.env`.
|
|
156
|
-
|
|
157
81
|
## Usage
|
|
158
82
|
|
|
159
83
|
Shortcut:
|
|
@@ -209,7 +133,7 @@ After changing the extension while pi is open, run:
|
|
|
209
133
|
/reload
|
|
210
134
|
```
|
|
211
135
|
|
|
212
|
-
##
|
|
136
|
+
## Links
|
|
213
137
|
|
|
214
138
|
- API key settings: https://console.volcengine.com/speech/new/setting/apikeys?projectName=default
|
|
215
139
|
- ASR product page: https://www.volcengine.com/product/asr
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-voice-input",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "provider-extensible voice input extension for pi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
"asr"
|
|
13
13
|
],
|
|
14
14
|
"license": "MIT",
|
|
15
|
+
"author": "tr-nc",
|
|
15
16
|
"repository": {
|
|
16
17
|
"type": "git",
|
|
17
|
-
"url": "
|
|
18
|
+
"url": "https://github.com/tr-nc/pi-voice-input.git"
|
|
18
19
|
},
|
|
19
20
|
"bugs": {
|
|
20
21
|
"url": "https://github.com/tr-nc/pi-voice-input/issues"
|