Download smoke_test.sh from Edge0/Audio8-ASR-0.1B-onnx-runtime: direct link, hf CLI and curl.
- Browser
- Download file 657 Bytes
-
https://huggingface.co/Edge0/Audio8-ASR-0.1B-onnx-runtime/resolve/83a48f4213b8f5c1c62a9e864cbbc5d6cdb4bf4d/smoke_test.sh
- Command line
-
hf download hf://Edge0/Audio8-ASR-0.1B-onnx-runtime@83a48f4213b8f5c1c62a9e864cbbc5d6cdb4bf4d/smoke_test.sh
-
curl -L -o smoke_test.sh https://huggingface.co/Edge0/Audio8-ASR-0.1B-onnx-runtime/resolve/83a48f4213b8f5c1c62a9e864cbbc5d6cdb4bf4d/smoke_test.sh
657 Bytes
| set -euo pipefail | |
| HOST="${1:-127.0.0.1}" | |
| PORT="${2:-7860}" | |
| if [[ $# -lt 3 ]]; then | |
| echo "Usage: $0 [host] [port] /path/to/audio.wav" >&2 | |
| exit 2 | |
| fi | |
| AUDIO_PATH="$3" | |
| BASE_URL="http://${HOST}:${PORT}" | |
| PYTHON_BIN="${PYTHON:-python3}" | |
| CURL_LOCAL=(curl --noproxy "*" -fsS) | |
| echo "[smoke] health ${BASE_URL}/health" | |
| "${CURL_LOCAL[@]}" "${BASE_URL}/health" | "$PYTHON_BIN" -m json.tool | |
| echo "[smoke] asr ${AUDIO_PATH}" | |
| "${CURL_LOCAL[@]}" -X POST "${BASE_URL}/asr" \ | |
| -F "audio=@${AUDIO_PATH}" \ | |
| -F "language=Chinese" \ | |
| -F "max_new_tokens=64" \ | |
| -F "cache_precision=int8" \ | |
| -F "audio_precision=int8" \ | |
| | "$PYTHON_BIN" -m json.tool | |