From 582cf29169bceaed8754cf6f7fefcd37ac4506b8 Mon Sep 17 00:00:00 2001 From: ntzyz Date: Sun, 5 Jul 2026 18:40:58 +0800 Subject: support windows --- xiaomi-asr.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xiaomi-asr.sh') 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', []) -- cgit v1.3.1