#2879 TaskCfg(cache_folder='F:/Tools/pyvideotrans/tmp/536/14700fc035', target_dir='C:/Users/chi/Videos/4K Video Downloader+/_v

54.168* Posted at: 1 day ago 👁14

语音识别阶段出错 [faster-whisper(本地)] 程序内部错误:'float' object cannot be interpreted as an integer
Traceback (most recent call last):
File "videotrans\task\job.py", line 106, in run
File "videotrans\task\trans_create.py", line 358, in recogn
File "videotrans\recognition\__init__.py", line 276, in run
File "videotrans\recognition\_base.py", line 136, in run
File "videotrans\recognition\_overall.py", line 76, in _download
File "videotrans\recognition\_base.py", line 118, in _vad_split
File "videotrans\configure\_base.py", line 265, in _new_process
File "videotrans\process\signelobj.py", line 73, in submit_task_cpu
File "videotrans\process\signelobj.py", line 56, in get_executor_cpu
File "concurrent\futures\process.py", line 650, in init
File "concurrent\futures\process.py", line 165, in init
File "multiprocessing\queues.py", line 49, in init
File "multiprocessing\context.py", line 88, in BoundedSemaphore
File "multiprocessing\synchronize.py", line 145, in init
File "multiprocessing\synchronize.py", line 57, in init
TypeError: 'float' object cannot be interpreted as an integer
TaskCfg(cache_folder='F:/Tools/pyvideotrans/tmp/536/14700fc035', target_dir='C:/Users/chi/Videos/4K Video Downloader+/_video_out/[Tutorial] Lipstick. Part 1.-mp4', remove_noise=True, is_separate=False, detect_language='en', subtitle_language=None, source_language='英语', target_language='简体中文', source_language_code='en', target_language_code='zh-cn', source_sub='C:/Users/chi/Videos/4K Video Downloader+/_video_out/[Tutorial] Lipstick. Part 1.-mp4/en.srt', target_sub='C:/Users/chi/Videos/4K Video Downloader+/_video_out/[Tutorial] Lipstick. Part 1.-mp4/zh-cn.srt', source_wav='F:/Tools/pyvideotrans/tmp/536/14700fc035/remove_noise.wav', source_wav_output='C:/Users/chi/Videos/4K Video Downloader+/_video_out/[Tutorial] Lipstick. Part 1.-mp4/en.m4a', target_wav='F:/Tools/pyvideotrans/tmp/536/14700fc035/target.wav', target_wav_output='C:/Users/chi/Videos/4K Video Downloader+/_video_out/[Tutorial] Lipstick. Part 1.-mp4/zh-cn.m4a', subtitles='', novoice_mp4='F:/Tools/pyvideotrans/tmp/536/14700fc035/novoice.mp4', noextname='[Tutorial] Lipstick. Part 1.', shibie_audio=None, targetdir_mp4='C:/Users/chi/Videos/4K Video Downloader+/_video_out/[Tutorial] Lipstick. Part 1.-mp4/[Tutorial] Lipstick. Part 1..mp4', instrument=None, vocal=None, back_audio='', background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+30%', pitch='+0Hz', voice_rate='+0%', voice_role='Xiaoxiao(Female/CN)', copysrt_rawvideo=False, clear_cache=False, translate_type=3, tts_type=0, recogn_type=0, model_name='large-v3-turbo', voice_autorate=False, video_autorate=True, cuda=True, name='C:/Users/chi/Videos/4K Video Downloader+/[Tutorial] Lipstick. Part 1..mp4', basename='[Tutorial] Lipstick. Part 1..mp4', ext='mp4', dirname='C:/Users/chi/Videos/4K Video Downloader+', shound_del_name=None, uuid='14700fc035', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=0, only_out_mp4=True, fix_punc=False, recogn2pass=True)


=
system:Windows-10-10.0.19044-SP0
version:v3.95
frozen:True
language:zh
root_dir:F:/Tools/pyvideotrans

1 Replies

这是由于语音识别参数中的“语音阈值”或“最大时长”等数值设置不当,导致在创建多进程池时参数被错误地传递为浮点数而非整数。

解决方案:

  1. 在软件主界面,点击“高级选项”按钮。
  2. 在“高级选项”窗口中,找到“语音识别参数”部分。
  3. 检查并调整以下参数,确保它们都是整数:

    • 语音阈值 (vad_threshold):默认应为 0.5,这是一个浮点数,但软件内部处理可能存在问题。请尝试将其改为一个整数,例如 1,或者暂时关闭 VAD 功能。
    • 最大时长 (max_seconds):确保此值为整数(例如 30)。
    • 最小时长 (min_seconds):确保此值为整数(例如 1)。
  4. 保存设置后,重新尝试语音识别任务。

如果问题依旧,可以尝试以下步骤:

  1. 在“高级选项”中,将“语音识别参数”下的“VAD”选项从 ten-vadsilero 切换为 none(即不使用 VAD 切分),然后重试。
  2. 如果使用的是预打包版,请确认软件解压路径不包含中文或空格(您的路径 F:/Tools/pyvideotrans 符合要求)。
  3. 如果以上方法均无效,请提供 logs/ 文件夹中最新日志文件的底部约30行内容,以便进一步分析。

参考文档:

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.

Related resource