jianchang512 / pyvideotrans

Translate the video from one language to another and add dubbing. 将视频从一种语言翻译为另一种语言,同时支持语音识别转录、语音合成、字幕翻译。
https://pyvideotrans.com
GNU General Public License v3.0
10.65k stars 1.2k forks source link

FileNotFoundError: 'zh-cn-nocut.wav' #142

Closed fengyunzaidushi closed 10 months ago

fengyunzaidushi commented 10 months ago

运行下面的命令: python cli.py --source_mp4 '/dalle3-tts story to website/story to website/Story to Website with dalle3 and TTS.mp4' --proxy http://127.0.0.1:7890/ --voice_role zh-CN-YunxiNeural --voice_autorate --whisper_model small

google translate code=200
Traceback (most recent call last):
  File "/mnt/sda/github/12yue/pyvideotrans/cli.py", line 168, in <module>
    running(config.video['source_mp4'])
  File "/mnt/sda/github/12yue/pyvideotrans/cli.py", line 154, in running
    get_large_audio_transcriptioncli(noextname, mp4ext, showprocess)
  File "/mnt/sda/github/12yue/pyvideotrans/videotrans/util/tools.py", line 689, in get_large_audio_transcriptioncli
    merge_audio_segments(segments, start_times, total_length * 1000, noextname)
  File "/mnt/sda/github/12yue/pyvideotrans/videotrans/util/tools.py", line 334, in merge_audio_segments
    merged_audio.export(f'{config.video["target_dir"]}/{noextname}/{config.video["target_language"]}-nocut.wav',
  File "/opt/miniconda3/envs/py39vidro/lib/python3.9/site-packages/pydub/audio_segment.py", line 867, in export
    out_f, _ = _fd_or_path_or_tempfile(out_f, 'wb+')
  File "/opt/miniconda3/envs/py39vidro/lib/python3.9/site-packages/pydub/utils.py", line 60, in _fd_or_path_or_tempfile
    fd = open(fd, mode=mode)
FileNotFoundError: [Errno 2] No such file or directory: '/dalle3-tts story to website/story to website/_video_out/Story to Website with dalle3 and TTS/zh-cn-nocut.wav'

image 已经转成中文190多条了,如果再重新运行又要消耗挺长时间。

jianchang512 commented 10 months ago

请使用 gui界面版,cli 很多个版本没维护了,可能存在不少问题。要使用的话,下载 老版本 https://github.com/jianchang512/pyvideotrans/releases/tag/v0.8.0