@nicfox77/parakeet-stt 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/install.sh +32 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nicfox77/parakeet-stt",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
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": {
@@ -9,9 +9,12 @@ set -e
9
9
  PARAKEET_DIR="${PARAKEET_DIR:-$HOME/.openclaw/tools/parakeet}"
10
10
  VENV_DIR="$PARAKEET_DIR/.venv"
11
11
 
12
- # Model URLs (from Handy project)
13
- MODEL_URLS_V2="https://blob.handy.computer/parakeet-v2-int8.tar.gz"
14
- MODEL_URLS_V3="https://blob.handy.computer/parakeet-v3-int8.tar.gz"
12
+ # Model URLs (GitHub release - mirrored from Handy project)
13
+ # Fallback to Handy if GitHub is unavailable
14
+ MODEL_URLS_V2="https://github.com/Nicfox77/openclaw-parakeet-stt-plugin/releases/download/v1.0.0/parakeet-v2-int8.tar.gz"
15
+ MODEL_URLS_V2_FALLBACK="https://blob.handy.computer/parakeet-v2-int8.tar.gz"
16
+ MODEL_URLS_V3="https://github.com/Nicfox77/openclaw-parakeet-stt-plugin/releases/download/v1.0.0/parakeet-v3-int8.tar.gz"
17
+ MODEL_URLS_V3_FALLBACK="https://blob.handy.computer/parakeet-v3-int8.tar.gz"
15
18
 
16
19
  # Default to V2 (English optimized)
17
20
  VERSION="${1:-v2}"
@@ -77,13 +80,32 @@ if [ ! -d "$MODEL_DIR" ] || [ ! -f "$MODEL_DIR/model.onnx" ]; then
77
80
 
78
81
  TMP_TAR="/tmp/parakeet-$VERSION-int8.tar.gz"
79
82
 
80
- if command -v wget &> /dev/null; then
81
- wget -O "$TMP_TAR" "$MODEL_URL"
82
- elif command -v curl &> /dev/null; then
83
- curl -L -o "$TMP_TAR" "$MODEL_URL"
84
- else
85
- echo "Error: wget or curl required for download"
86
- exit 1
83
+ download_model() {
84
+ local url="$1"
85
+ local output="$2"
86
+ if command -v wget &> /dev/null; then
87
+ wget -O "$output" "$url"
88
+ elif command -v curl &> /dev/null; then
89
+ curl -L -o "$output" "$url"
90
+ else
91
+ echo "Error: wget or curl required for download"
92
+ return 1
93
+ fi
94
+ }
95
+
96
+ # Try primary URL, fall back to Handy if it fails
97
+ if ! download_model "$MODEL_URL" "$TMP_TAR"; then
98
+ echo "Primary download failed, trying fallback..."
99
+ FALLBACK_URL=""
100
+ if [[ "$VERSION" == "v2" ]]; then
101
+ FALLBACK_URL="$MODEL_URLS_V2_FALLBACK"
102
+ else
103
+ FALLBACK_URL="$MODEL_URLS_V3_FALLBACK"
104
+ fi
105
+ if ! download_model "$FALLBACK_URL" "$TMP_TAR"; then
106
+ echo "Error: Failed to download model"
107
+ exit 1
108
+ fi
87
109
  fi
88
110
 
89
111
  echo "Extracting model..."