2noise / ChatTTS

A generative speech model for daily dialogue.
https://2noise.com
GNU Affero General Public License v3.0
32.08k stars 3.49k forks source link

bug:main、dev code run main.py has error:lzma.LZMAError: Corrupt input data #800

Open xhjcxxl opened 1 week ago

xhjcxxl commented 1 week ago

I use the latest code, in main,dev;i find use api in api/main.py, the web result is error, no voice and server has:lzma.LZMAError: Corrupt input data

1.i try check model,code and pip package,it's run,but generate has no voice and is noise audio_files (19).zip

  1. i set use_vllm, it's work, but generate has noise and other voice,like this: audio_files (20).zip
wu-tender commented 1 week ago

最近改了啥了吗,一样的代码报错了 Traceback (most recent call last): File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi result = await app( # type: ignore[func-returns-value] File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call return await self.app(scope, receive, send) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in call await super().call(scope, receive, send) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/applications.py", line 113, in call await self.middleware_stack(scope, receive, send) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/middleware/errors.py", line 187, in call raise exc File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/middleware/errors.py", line 165, in call await self.app(scope, receive, _send) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/routing.py", line 715, in call await self.middleware_stack(scope, receive, send) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/routing.py", line 735, in app await route.handle(scope, receive, send) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/routing.py", line 288, in handle await self.app(scope, receive, send) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/starlette/routing.py", line 73, in app response = await f(request) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/fastapi/routing.py", line 301, in app raw_response = await run_endpoint_function( File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/fastapi/routing.py", line 212, in run_endpoint_function return await dependant.call(values) File "/mnt/user/xiaxiaolin/ivr/source_data/ChatTTS1/ChatTTS/examples/api/main.py", line 82, in generate_voice wavs = chat.infer( File "/mnt/user/xiaxiaolin/ivr/source_data/ChatTTS1/ChatTTS/ChatTTS/core.py", line 220, in infer return next(res_gen) File "/mnt/user/xiaxiaolin/ivr/source_data/ChatTTS1/ChatTTS/ChatTTS/core.py", line 390, in _infer for result in self._infer_code( File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(*args, *kwargs) File "/mnt/user/xiaxiaolin/ivr/source_data/ChatTTS1/ChatTTS/ChatTTS/core.py", line 490, in _infer_code self.speaker.decode_prompt(params.spk_smp) File "/opt/conda/envs/wghtts/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(args, kwargs) File "/mnt/user/xiaxiaolin/ivr/source_data/ChatTTS1/ChatTTS/ChatTTS/model/speaker.py", line 112, in decode_prompt lzma.decompress( File "/opt/conda/envs/wghtts/lib/python3.10/lzma.py", line 343, in decompress res = decomp.decompress(data) _lzma.LZMAError: Corrupt input data

wu-tender commented 1 week ago

有没有大师帮忙看一下,之前都还可以用,这两天不行了

fumiama commented 6 days ago

example/api hasn't been updated for the latest code. However, the webui works. You should write your own api by referring webui to solve this problem.