You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
392 B

import requests
# 音频文件路径
audio_file = r"G:\Work_data\workstation\Forwork-voice-txt\FireRedASR\叠词检测\大湖口镇米湖村适配器-763882-20251101083039.mp3"
# API 地址
url = "http://localhost:8001/api/upload"
# 上传文件
with open(audio_file, 'rb') as f:
files = {'file': f}
response = requests.post(url, files=files)
# 打印结果
print(response.json())