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())