binary-husky / binary-husky/gpt_academic
[Bug]: 关于语音的bug吧,可不可以把自动播放功能设置为可选项目
- Dominant language
- Python
- Stars
- 71.3k
- Forks
- 8.3k
- PR merge metrics
- No merged PRs in 30d
Description
### Installation Method | 安装方法与平台
OneKeyInstall (一键安装脚本-windows)
### Version | 版本
Latest | 最新版
### OS | 操作系统
Windows
### Describe the bug | 简述
可不可以把自动播放功能设置为可选项目,自动本地更新项目之后,就一直有这个错误。
### Screen Shot | 有帮助的截图
D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\pydub\utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work
warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 396, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 70, in __call__
return await self.app(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\applications.py", line 123, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 758, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 778, in app
await route.handle(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 487, in handle
await self.app(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\applications.py", line 123, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\cors.py", line 91, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\cors.py", line 146, in simple_response
await self.app(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 758, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 778, in app
await route.handle(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 299, in handle
await self.app(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 79, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 74, in app
response = await func(request)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\fastapi\routing.py", line 278, in app
raw_response = await run_endpoint_function(
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\fastapi\routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
File "D:\OneKeyInstallerForWindowsAndMacOS\gpt_academic\shared_utils\fastapi_server.py", line 179, in forward_post_request
return await forward_request(request, "POST")
File "D:\OneKeyInstallerForWindowsAndMacOS\gpt_academic\shared_utils\fastapi_server.py", line 163, in forward_request
mp3_audio = AudioSegment.from_file(temp_file, format="mp3")
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\pydub\audio_segment.py", line 728, in from_file
info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\pydub\utils.py", line 274, in mediainfo_json
res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\subprocess.py", line 1456, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 396, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 70, in __call__
return await self.app(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\applications.py", line 123, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 758, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 778, in app
await route.handle(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 487, in handle
await self.app(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\applications.py", line 123, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\cors.py", line 91, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\cors.py", line 146, in simple_response
await self.app(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 758, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 778, in app
await route.handle(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 299, in handle
await self.app(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 79, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 74, in app
response = await func(request)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\fastapi\routing.py", line 278, in app
raw_response = await run_endpoint_function(
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\fastapi\routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
File "D:\OneKeyInstallerForWindowsAndMacOS\gpt_academic\shared_utils\fastapi_server.py", line 179, in forward_post_request
return await forward_request(request, "POST")
File "D:\OneKeyInstallerForWindowsAndMacOS\gpt_academic\shared_utils\fastapi_server.py", line 163, in forward_request
mp3_audio = AudioSegment.from_file(temp_file, format="mp3")
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\pydub\audio_segment.py", line 728, in from_file
info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\pydub\utils.py", line 274, in mediainfo_json
res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\subprocess.py", line 1456, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
### Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 396, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 70, in __call__
return await self.app(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\applications.py", line 123, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 758, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 778, in app
await route.handle(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 487, in handle
await self.app(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\applications.py", line 123, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\cors.py", line 91, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\cors.py", line 146, in simple_response
await self.app(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 758, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 778, in app
await route.handle(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 299, in handle
await self.app(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 79, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
raise exc
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\starlette\routing.py", line 74, in app
response = await func(request)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\fastapi\routing.py", line 278, in app
raw_response = await run_endpoint_function(
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\fastapi\routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
File "D:\OneKeyInstallerForWindowsAndMacOS\gpt_academic\shared_utils\fastapi_server.py", line 179, in forward_post_request
return await forward_request(request, "POST")
File "D:\OneKeyInstallerForWindowsAndMacOS\gpt_academic\shared_utils\fastapi_server.py", line 163, in forward_request
mp3_audio = AudioSegment.from_file(temp_file, format="mp3")
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\pydub\audio_segment.py", line 728, in from_file
info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\site-packages\pydub\utils.py", line 274, in mediainfo_json
res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "D:\OneKeyInstallerForWindowsAndMacOS\installer_files\env\lib\subprocess.py", line 1456, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in shared_utils/fastapi_server.py, especially forward_request around the AudioSegment.from_file call shown in the traceback. Reproduce the Windows voice request with the OneKeyInstall setup, then trace how automatic playback is triggered and how the missing ffprobe error is handled. Done means users can choose whether audio plays automatically without the reported ASGI exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fastapi, python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100