bugfix: tmp dir

This commit is contained in:
2025-10-11 13:04:25 +08:00
parent f8d763fb7e
commit 72962ef0f6
2 changed files with 1 additions and 1 deletions

2
api.py
View File

@@ -47,7 +47,7 @@ async def analyze_audio(
- 500: 服务器内部处理异常(返回具体错误信息) - 500: 服务器内部处理异常(返回具体错误信息)
""" """
try: try:
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav", dir="./data/tmp") as temp_file: with tempfile.NamedTemporaryFile(delete=False, suffix=".wav", dir="./tmp") as temp_file:
temp_file.write(audio_data) temp_file.write(audio_data)
temp_file_path = temp_file.name temp_file_path = temp_file.name
# 将字节数据转换为numpy数组 # 将字节数据转换为numpy数组

0
tmp/tmp.wav Normal file
View File