#577 string index out of range

104.249* Posted at: 20 days ago 👁111

string index out of range

=====

Windows-10-10.0.26100-SP0

version:v3.80

frozen:True

language:zh

5 Replies

Admin

信息太少无法判断问题,请补充出错时logs文件夹下以当前日期命名的 .log 文件,底部50行

同样,发现是翻译后如果是空白的句子就会这样,需要在传给TTS的时候判断是否是超长或者空字符串

image

把空白字符随便替换个文字就可以了,但我感觉应该软件提供参数自动忽略空白字符

我也出现同样错误提示,现在提供出错时logs文件夹下以当前日期命名的 .log 文件,底部50行提供分析。需要注意的是,我7个文件有5个成功运行没问题,2个视频则总失败,提示string index out of range:2025-09-27 23:16:10,246 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:10,246 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '它可以生成.', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:11,707 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:11,708 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '每次都有新结果。', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:13,579 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:13,579 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '所以这就是.', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:15,094 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:15,095 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '如何使用内置的.', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:17,393 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:17,393 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '模块或.', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:18,966 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:18,967 - VideoTrans - INFO - GPT-SoVITS get:data={'text': 'Python中的内置包。', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:20,597 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:20,597 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '我希望你有.', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:22,195 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:22,196 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '乐趣地使用这些.', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:24,157 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:24,157 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '配方和这些代码示例。', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:25,682 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:25,683 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '在下一课中,', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:27,617 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:27,618 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '我们将超越.', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:28,996 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:28,996 - VideoTrans - INFO - GPT-SoVITS get:data={'text': 'Python的内置.', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:31,189 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:31,190 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '包,转向.', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:33,701 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:33,702 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '第三方包.', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:35,314 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:35,314 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '你可以经常下载和安装的。', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:37,035 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:37,035 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '这将显著.', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:38,962 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:38,962 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '开辟空间.', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:40,760 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:40,761 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '让Python可以做的事情。', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

2025-09-27 23:16:42,234 - VideoTrans - INFO - Starting call to 'videotrans.tts._gptsovits.GPTSoVITS._item_task.._run', this is the 1st time calling it.

2025-09-27 23:16:42,234 - VideoTrans - INFO - GPT-SoVITS get:data={'text': '我会在下一个视频中见到你。我会在下一个视频中见到你。', 'text_lang': 'zh', 'ref_audio_path': 'wuendaone.wav', 'prompt_text': "you'll see how to set up Python to run on your own computer.", 'prompt_lang': 'en', 'speed_factor': 1.0}

self.api_url='http://127.0.0.1:9880/tts'

我的解决办法就是自己改源码编译.

https://github.com/jianchang512/pyvideotrans/issues/909

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Donate: https://ko-fi.com/jianchang512

Similar issues already exist

Trending Questions