lenML / ChatTTS-Forge

🍦 ChatTTS-Forge is a project developed around the TTS generation model ChatTTS, implementing an API Server and a Gradio-based WebUI.
https://huggingface.co/spaces/lenML/ChatTTS-Forge
GNU Affero General Public License v3.0
433 stars 54 forks source link

SSML出错wave.Error: bad sample width #39

Open beierjie39 opened 2 weeks ago

beierjie39 commented 2 weeks ago

SSML出错,Examples里的每个都试过,报错一样 Traceback (most recent call last): File "F:\audio\ChatTTS-Forge\python\lib\site-packages\gradio\queueing.py", line 532, in process_events response = await route_utils.call_process_api( File "F:\audio\ChatTTS-Forge\python\lib\site-packages\gradio\route_utils.py", line 276, in call_process_api output = await app.get_blocks().process_api( File "F:\audio\ChatTTS-Forge\python\lib\site-packages\gradio\blocks.py", line 1933, in process_api data = await self.postprocess_data(block_fn, result["prediction"], state) File "F:\audio\ChatTTS-Forge\python\lib\site-packages\gradio\blocks.py", line 1756, in postprocess_data prediction_value = block.postprocess(prediction_value) File "F:\audio\ChatTTS-Forge\python\lib\site-packages\gradio\components\audio.py", line 266, in postprocess file_path = processing_utils.save_audio_to_cache( File "F:\audio\ChatTTS-Forge\python\lib\site-packages\gradio\processing_utils.py", line 244, in save_audio_to_cache audio_to_file(sample_rate, data, filename, format=format) File "F:\audio\ChatTTS-Forge\python\lib\site-packages\gradio\processing_utils.py", line 575, in audio_to_file file = audio.export(filename, format=format) File "F:\audio\ChatTTS-Forge\python\lib\site-packages\pydub\audio_segment.py", line 890, in export wave_data.setsampwidth(self.sample_width) File "F:\audio\ChatTTS-Forge\python\lib\wave.py", line 353, in setsampwidth raise Error('bad sample width') wave.Error: bad sample width

zhzLuke96 commented 2 weeks ago

这个bug曾经有过,应该是修复过的,请拉取最新的代码重新尝试

如果还有问题请提供更详细的运行环境信息

funcxs commented 2 weeks ago

INFO:modules.ssml:collect len(segments): 1 ERROR:root:'dict' object has no attribute 'attrs' Traceback (most recent call last): File "D:\其它\Chattts\ChatTTS-Forg\modules\api\impl\ssml_api.py", line 53, in synthesize_ssml audio_segments = synthesize.synthesize_segments(segments) File "D:\其它\Chattts\ChatTTS-Forg\modules\SynthesizeSegments.py", line 211, in synthesize_segments buckets = self.bucket_segments(segments) File "D:\其它\Chattts\ChatTTS-Forg\modules\SynthesizeSegments.py", line 193, in bucket_segments params = self.segment_to_generate_params(segment) File "D:\其它\Chattts\ChatTTS-Forg\modules\SynthesizeSegments.py", line 95, in segment_to_generate_params attrs = segment.attrs AttributeError: 'dict' object has no attribute 'attrs' INFO: 127.0.0.1:50607 - "POST /v1/ssml HTTP/1.1" 500 Internal Server Error INFO:modules.ssml:collect len(segments): 1 ERROR:root:'dict' object has no attribute 'attrs' Traceback (most recent call last): File "D:\其它\Chattts\ChatTTS-Forg\modules\api\impl\ssml_api.py", line 53, in synthesize_ssml audio_segments = synthesize.synthesize_segments(segments) File "D:\其它\Chattts\ChatTTS-Forg\modules\SynthesizeSegments.py", line 211, in synthesize_segments buckets = self.bucket_segments(segments) File "D:\其它\Chattts\ChatTTS-Forg\modules\SynthesizeSegments.py", line 193, in bucket_segments params = self.segment_to_generate_params(segment) File "D:\其它\Chattts\ChatTTS-Forg\modules\SynthesizeSegments.py", line 95, in segment_to_generate_params attrs = segment.attrs AttributeError: 'dict' object has no attribute 'attrs' SSML功能报错 大佬怎么解决

zhzLuke96 commented 2 weeks ago

INFO:modules.ssml:collect len(segments): 1 ERROR:root:'dict' object has no attribute 'attrs' Traceback (most recent call last): File "D:\其它\Chattts\ChatTTS-Forg\modules\api\impl\ssml_api.py", line 53, in synthesize_ssml audio_segments = synthesize.synthesize_segments(segments) File "D:\其它\Chattts\ChatTTS-Forg\modules\SynthesizeSegments.py", line 211, in synthesize_segments buckets = self.bucket_segments(segments) File "D:\其它\Chattts\ChatTTS-Forg\modules\SynthesizeSegments.py", line 193, in bucket_segments params = self.segment_to_generate_params(segment) File "D:\其它\Chattts\ChatTTS-Forg\modules\SynthesizeSegments.py", line 95, in segment_to_generate_params attrs = segment.attrs AttributeError: 'dict' object has no attribute 'attrs' INFO: 127.0.0.1:50607 - "POST /v1/ssml HTTP/1.1" 500 Internal Server Error INFO:modules.ssml:collect len(segments): 1 ERROR:root:'dict' object has no attribute 'attrs' Traceback (most recent call last): File "D:\其它\Chattts\ChatTTS-Forg\modules\api\impl\ssml_api.py", line 53, in synthesize_ssml audio_segments = synthesize.synthesize_segments(segments) File "D:\其它\Chattts\ChatTTS-Forg\modules\SynthesizeSegments.py", line 211, in synthesize_segments buckets = self.bucket_segments(segments) File "D:\其它\Chattts\ChatTTS-Forg\modules\SynthesizeSegments.py", line 193, in bucket_segments params = self.segment_to_generate_params(segment) File "D:\其它\Chattts\ChatTTS-Forg\modules\SynthesizeSegments.py", line 95, in segment_to_generate_params attrs = segment.attrs AttributeError: 'dict' object has no attribute 'attrs' SSML功能报错 大佬怎么解决

先拉新代码重试,要是还有问题的话提 api bug issue