@app.post("/inference")
async def inference_endpoint(
    audio_file: UploadFile = File(...),
    video_file: UploadFile = File(...),
    bbox_shift: float = Form(0),
    batch_size_args: int = Form(8),
    use_saved_coord_args: bool = Form(False),
    trim_video: bool = Form(False),
):
    # 保存上传的文件到临时目录
    with tempfile.TemporaryDirectory() as tmp_dir:
        audio_temp_path = os.path.join(
            tmp_dir, f"audio{os.path.splitext(audio_file.filename)[1]}")
        with open(audio_temp_path, 'wb') as f:
            content = await audio_file.read()
            f.write(content)

        video_temp_path = os.path.join(
            tmp_dir, f"video{os.path.splitext(video_file.filename)[1]}")
        with open(video_temp_path, 'wb') as f:
            content = await video_file.read()
            f.write(content)

        # 调用推理函数
        output_video_path, bbox_shift_text = inference(
            audio_path=audio_temp_path,
            video_path=video_temp_path,
            bbox_shift=bbox_shift,
            batch_size_args=batch_size_args,
            use_saved_coord_args=use_saved_coord_args,
            trim_video=trim_video,
            result_dir=tmp_dir
        )
        breakpoint()
        # 将生成的视频作为响应返回
        return FileResponse(
            output_video_path,
            media_type='video/mp4',
            filename=os.path.basename(output_video_path)
        )
         这个代码提示100%|███████████████████████████████████████████████████████████████████████████████| 339/339 [00:22<00:00, 15.20it/s]
ffmpeg -y -v warning -r 30.000669657804863 -f image2 -i /tmp/tmp_l5pd5a8/video_audio/%08d.png -vcodec libx264 -vf format=rgb24,scale=out_color_matrix=bt709,format=yuv420p -crf 18 /tmp/tmp_l5pd5a8/temp.mp4
ffmpeg -y -v warning -i /tmp/tmp_l5pd5a8/audio.mp3 -i /tmp/tmp_l5pd5a8/temp.mp4 /tmp/tmp_l5pd5a8/video_audio.mp4
[mp3 @ 0x55ccc521c840] Estimating duration from bitrate, this may be inaccurate
result is save to /tmp/tmp_l5pd5a8/video_audio.mp4
代码块执行耗时：91.88295388221741秒
> /root/MuseTalk/api.py(345)inference_endpoint()
-> return FileResponse(
(Pdb) output_video_path
'/tmp/tmp_l5pd5a8/video_audio.mp4'
(Pdb) output_video_path
'/tmp/tmp_l5pd5a8/video_audio.mp4'
(Pdb) n
> /root/MuseTalk/api.py(346)inference_endpoint()
-> output_video_path,
(Pdb) n
> /root/MuseTalk/api.py(347)inference_endpoint()
-> media_type='video/mp4',
(Pdb) n
> /root/MuseTalk/api.py(348)inference_endpoint()
-> filename=os.path.basename(output_video_path)
(Pdb) n
> /root/MuseTalk/api.py(345)inference_endpoint()
-> return FileResponse(
(Pdb) n
Internal StopIteration: <starlette.responses.FileResponse object at 0x7efe707d3dc0>
> /root/miniconda3/envs/musetalk/lib/python3.8/site-packages/fastapi/routing.py(191)run_endpoint_function()
-> return await dependant.call(**values)
(Pdb) c
INFO:     127.0.0.1:39066 - "POST /inference HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/responses.py", line 327, in __call__
    stat_result = await anyio.to_thread.run_sync(os.stat, self.path)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 2106, in run_sync_in_worker_thread
    return await future
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 833, in run
    result = context.run(func, *args)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp_l5pd5a8/video_audio.mp4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 407, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__
    return await self.app(scope, receive, send)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/middleware/cors.py", line 93, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/middleware/cors.py", line 148, in simple_response
    await self.app(scope, receive, send)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/routing.py", line 75, in app
    await response(scope, receive, send)
  File "/root/miniconda3/envs/musetalk/lib/python3.8/site-packages/starlette/responses.py", line 330, in __call__
    raise RuntimeError(f"File at path {self.path} does not exist.")
RuntimeError: File at path /tmp/tmp_l5pd5a8/video_audio.mp4 does not exist. 请你帮我修正下