post.py
CHANGED
|
@@ -2,10 +2,12 @@ import requests
|
|
| 2 |
import json
|
| 3 |
import os
|
| 4 |
|
| 5 |
-
url = "http://127.0.0.1:
|
| 6 |
|
| 7 |
# 音频文件路径,根据 readme.txt #L23,这里以 60s.wav 为例
|
| 8 |
-
|
|
|
|
|
|
|
| 9 |
|
| 10 |
if not os.path.exists(audio_file):
|
| 11 |
print(f"找不到音频文件: {audio_file}")
|
|
|
|
| 2 |
import json
|
| 3 |
import os
|
| 4 |
|
| 5 |
+
url = "http://127.0.0.1:8082/inference"
|
| 6 |
|
| 7 |
# 音频文件路径,根据 readme.txt #L23,这里以 60s.wav 为例
|
| 8 |
+
# 使用相对路径
|
| 9 |
+
script_dir = os.path.dirname(os.path.abspath(__file__))
|
| 10 |
+
audio_file = os.path.join(script_dir, "KotobaASRLLM", "60s.wav")
|
| 11 |
|
| 12 |
if not os.path.exists(audio_file):
|
| 13 |
print(f"找不到音频文件: {audio_file}")
|