夜雨飘零
2024-02-03 2cf4084b23db9bd9e8ce4db76d0628ef6655ed71
fix retract error (#1350)

1个文件已修改
4 ■■■ 已修改文件
runtime/python/http/server.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
runtime/python/http/server.py
@@ -4,6 +4,7 @@
import uuid
import aiofiles
import ffmpeg
import uvicorn
from fastapi import FastAPI, File, UploadFile
from modelscope.utils.logger import get_logger
@@ -105,7 +106,6 @@
app = FastAPI(title="FunASR")
param_dict = {"sentence_timestamp": True, "batch_size_s": 300}
if args.hotword_path is not None and os.path.exists(args.hotword_path):
    with open(args.hotword_path, 'r', encoding='utf-8') as f:
        lines = f.readlines()
@@ -122,7 +122,6 @@
    async with aiofiles.open(audio_path, 'wb') as out_file:
        content = await audio.read()
        await out_file.write(content)
        try:
        audio_bytes, _ = (
            ffmpeg.input(audio_path, threads=0)
@@ -150,7 +149,6 @@
    else:
        logger.info(f'识别结果:{rec_results}')
        return {"msg": "未知错误", "code": -1}
if __name__ == '__main__':