chore: update workspace config and memory
This commit is contained in:
9
bin/stt-cli
Executable file
9
bin/stt-cli
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# STT CLI wrapper - calls llama server API
|
||||
FILE="$1"
|
||||
[ -z "$FILE" ] && { echo '{"ok":false,"error":"no file"}'; exit 1; }
|
||||
[ ! -f "$FILE" ] && { echo "{\"ok\":false,\"error\":\"file not found: $FILE\"}"; exit 1; }
|
||||
|
||||
URL="http://llama:9090/api/stt"
|
||||
RESULT=$(curl -s --max-time 60 -X POST "$URL" -F "file=@$FILE")
|
||||
echo "$RESULT" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('text',''))" 2>/dev/null || echo "$RESULT"
|
||||
Reference in New Issue
Block a user