diff options
Diffstat (limited to 'xiaomi-asr.sh')
| -rw-r--r-- | xiaomi-asr.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xiaomi-asr.sh b/xiaomi-asr.sh index 532233d..2452c45 100644 --- a/xiaomi-asr.sh +++ b/xiaomi-asr.sh @@ -41,7 +41,7 @@ if [ "$FORMAT" = "wav" ] && [[ ! "$EXT" =~ ^[Ww][Aa][Vv]$ ]] && [[ ! "$EXT" =~ ^ fi # Build JSON payload and call API using Python to avoid arg-length limits -RESPONSE=$(python3 - "$AUDIO_INPUT" "$MODEL" "$FORMAT" "$API_KEY" "$BASE_URL" << 'PYEOF' +RESPONSE=$(python - "$AUDIO_INPUT" "$MODEL" "$FORMAT" "$API_KEY" "$BASE_URL" << 'PYEOF' import base64, json, sys, urllib.request, urllib.error, ssl input_path = sys.argv[1] @@ -83,7 +83,7 @@ PYEOF ) # Extract the transcribed text from the response -TRANSCRIPT=$(python3 -c " +TRANSCRIPT=$(python -c " import json, sys resp = json.loads(sys.stdin.read()) choices = resp.get('choices', []) |
