From 28ccfbfc51068a663a80764e14074df5edf2b5ba Mon Sep 17 00:00:00 2001
From: kongdeqiang <kongdeqiang960204@163.com>
Date: 星期五, 13 三月 2026 17:41:41 +0800
Subject: [PATCH] 提交
---
runtime/python/onnxruntime/funasr_client_http.py | 27 ++++++++++++++++++---------
1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/runtime/python/onnxruntime/funasr_client_http.py b/runtime/python/onnxruntime/funasr_client_http.py
index 1ddd62c..bd0d9d6 100644
--- a/runtime/python/onnxruntime/funasr_client_http.py
+++ b/runtime/python/onnxruntime/funasr_client_http.py
@@ -3,16 +3,25 @@
import threading
-with open('A2_0.wav','rb') as f:
- test_wav_bytes=f.read()
-url='http://127.0.0.1:8888/api/asr'
-def send_post(i,url,wav_bytes):
- r1=requests.post(url,json={'wav_base64':str(base64.b64encode(wav_bytes), 'utf-8')})
- print('绾跨▼:',i,r1.json())
+with open("A2_0.wav", "rb") as f:
+ test_wav_bytes = f.read()
+url = "http://127.0.0.1:8888/api/asr"
+
+
+def send_post(i, url, wav_bytes):
+ r1 = requests.post(url, json={"wav_base64": str(base64.b64encode(wav_bytes), "utf-8")})
+ print("绾跨▼:", i, r1.json())
for i in range(100):
- t = threading.Thread(target=send_post, args=(i,url,test_wav_bytes,))
+ t = threading.Thread(
+ target=send_post,
+ args=(
+ i,
+ url,
+ test_wav_bytes,
+ ),
+ )
t.start()
- #t.join()
-print('瀹屾垚娴嬭瘯')
\ No newline at end of file
+ # t.join()
+print("瀹屾垚娴嬭瘯")
--
Gitblit v1.9.1