#1185 ValueError: could not convert string to float: '3-5'

240e:370* Posted at: 5 days ago 👁34

无效的值或参数:could not convert string to float: '3-5':
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 18, in run
File "videotrans\tts\__init__.py", line 245, in run
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "pyimod02_importers.py", line 457, in exec_module
File "videotrans\tts\_edgetts.py", line 12, in
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "pyimod02_importers.py", line 457, in exec_module
File "videotrans\tts\_base.py", line 31, in
File "videotrans\tts\_base.py", line 56, in BaseTTS
ValueError: could not convert string to float: '3-5'


=
system:Windows-10-10.0.19045-SP0
version:v3.82
frozen:True
language:zh
root_dir:C:/Users/win10/Desktop/1q

1 Replies

这个错误是由于在配音设置中,语速参数格式不正确导致的。错误信息显示系统无法将字符串 '3-5' 转换为浮点数。

请按以下步骤解决:

  1. 在软件主界面,点击菜单栏的 TTS配音设置
  2. 找到 语速 参数输入框
  3. 将当前值 '3-5' 修改为合法的浮点数格式,例如:

    • 正常语速:1.0
    • 稍快语速:1.2
    • 稍慢语速:0.8

语速参数的有效范围通常在 0.5 到 2.0 之间,必须是单个数字,不能包含连字符或其他非数字字符。

修改后重新尝试配音操作即可解决此问题。

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

Trending Questions