@nicfox77/parakeet-stt 0.2.4 → 0.2.6
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/package.json +2 -2
- package/scripts/install.sh +34 -52
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nicfox77/parakeet-stt",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Parakeet TDT INT8 speech-to-text plugin for OpenClaw. Supports V2 (English) and V3 (Multilingual) models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/Nicfox77/openclaw-parakeet-stt.git"
|
|
8
|
+
"url": "git+https://github.com/Nicfox77/openclaw-parakeet-stt-plugin.git"
|
|
9
9
|
},
|
|
10
10
|
"author": "Nicfox77",
|
|
11
11
|
"license": "MIT",
|
package/scripts/install.sh
CHANGED
|
@@ -8,7 +8,6 @@ set -e
|
|
|
8
8
|
# Configuration
|
|
9
9
|
PARAKEET_DIR="${PARAKEET_DIR:-$HOME/.openclaw/tools/parakeet}"
|
|
10
10
|
VENV_DIR="$PARAKEET_DIR/.venv"
|
|
11
|
-
OPENCLAW_CONFIG="$HOME/.openclaw/openclaw.json"
|
|
12
11
|
|
|
13
12
|
# Model URLs (GitHub release - mirrored from Handy project)
|
|
14
13
|
# Fallback to Handy if GitHub is unavailable
|
|
@@ -146,64 +145,44 @@ done
|
|
|
146
145
|
|
|
147
146
|
# Configure OpenClaw to use Parakeet for audio transcription
|
|
148
147
|
configure_openclaw() {
|
|
149
|
-
if [ ! -f "$OPENCLAW_CONFIG" ]; then
|
|
150
|
-
echo "Warning: OpenClaw config not found at $OPENCLAW_CONFIG"
|
|
151
|
-
return 1
|
|
152
|
-
fi
|
|
153
|
-
|
|
154
|
-
# Check if parakeet is already configured
|
|
155
|
-
if jq -e '.tools.media.audio.models[]? | select(.command | contains("parakeet"))' "$OPENCLAW_CONFIG" > /dev/null 2>&1; then
|
|
156
|
-
echo "Parakeet already configured in OpenClaw"
|
|
157
|
-
return 0
|
|
158
|
-
fi
|
|
159
|
-
|
|
160
148
|
echo "Configuring OpenClaw to use Parakeet for audio transcription..."
|
|
161
149
|
|
|
162
|
-
#
|
|
150
|
+
# Try config.patch first (partial update)
|
|
163
151
|
if command -v openclaw &> /dev/null; then
|
|
164
|
-
|
|
165
|
-
{
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
152
|
+
openclaw gateway call config.patch --params '{
|
|
153
|
+
"patch": {
|
|
154
|
+
"tools": {
|
|
155
|
+
"media": {
|
|
156
|
+
"audio": {
|
|
157
|
+
"models": [{
|
|
158
|
+
"type": "cli",
|
|
159
|
+
"command": "'$PARAKEET_DIR'/parakeet-audio-client.py",
|
|
160
|
+
"args": ["{{MediaPath}}", "{{OutputDir}}"]
|
|
161
|
+
}]
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
175
165
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
EOF
|
|
183
|
-
)
|
|
184
|
-
openclaw gateway call config.patch --params "$patch_json" 2>/dev/null && {
|
|
185
|
-
echo "Applied config.patch - Parakeet configured and gateway reloaded"
|
|
166
|
+
}' 2>/dev/null && {
|
|
167
|
+
echo "Config updated via config.patch"
|
|
168
|
+
echo ""
|
|
169
|
+
echo "IMPORTANT: Restart the gateway to activate transcription:"
|
|
170
|
+
echo " openclaw gateway restart"
|
|
186
171
|
return 0
|
|
187
|
-
} || {
|
|
188
|
-
echo "config.patch failed, falling back to file modification..."
|
|
189
172
|
}
|
|
190
173
|
fi
|
|
191
174
|
|
|
192
|
-
# Fallback:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
echo "Warning: jq not found, skipping automatic config"
|
|
204
|
-
echo "Please manually add to openclaw.json:"
|
|
205
|
-
echo ' tools.media.audio.models: [{"type": "cli", "command": "'$PARAKEET_DIR'/parakeet-audio-client.py", "args": ["{{MediaPath}}", "{{OutputDir}}"]}]'
|
|
206
|
-
fi
|
|
175
|
+
# Fallback: manual instructions
|
|
176
|
+
echo ""
|
|
177
|
+
echo "Please add to your openclaw.json under tools.media.audio:"
|
|
178
|
+
echo ""
|
|
179
|
+
echo ' "models": [{'
|
|
180
|
+
echo ' "type": "cli",'
|
|
181
|
+
echo ' "command": "'$PARAKEET_DIR'/parakeet-audio-client.py",'
|
|
182
|
+
echo ' "args": ["{{MediaPath}}", "{{OutputDir}}"]'
|
|
183
|
+
echo ' }]'
|
|
184
|
+
echo ""
|
|
185
|
+
echo "Then restart: openclaw gateway restart"
|
|
207
186
|
}
|
|
208
187
|
|
|
209
188
|
configure_openclaw || true
|
|
@@ -220,4 +199,7 @@ echo "To switch models, run:"
|
|
|
220
199
|
echo " $0 v2 # English optimized"
|
|
221
200
|
echo " $0 v3 # Multilingual"
|
|
222
201
|
echo ""
|
|
223
|
-
echo "
|
|
202
|
+
echo "IMPORTANT: Apply config to activate transcription:"
|
|
203
|
+
echo " openclaw gateway call config.apply --params '{\"note\": \"Parakeet STT\"}'"
|
|
204
|
+
echo ""
|
|
205
|
+
echo "Or restart the gateway service completely."
|