Skip to content

关于音频加载失败 #2316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zhixuan45 opened this issue Apr 23, 2025 · 3 comments
Open

关于音频加载失败 #2316

zhixuan45 opened this issue Apr 23, 2025 · 3 comments

Comments

@zhixuan45
Copy link

说明:在a卡环境下进行的,相关教程

Traceback (most recent call last):
  File "/home/zhixuan/GPT-SoVITS/tools/my_utils.py", line 21, in load_audio
    ffmpeg.input(file, threads=0)
AttributeError: module 'ffmpeg' has no attribute 'input'
/home/zhixuan/sounds/遐蝶-崩坏_星穹铁道WIKI-开拓者笔记-米游社-1.wav ->fail-> Traceback (most recent call last):
  File "/home/zhixuan/GPT-SoVITS/tools/my_utils.py", line 21, in load_audio
    ffmpeg.input(file, threads=0)
AttributeError: module 'ffmpeg' has no attribute 'input'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/zhixuan/GPT-SoVITS/tools/slice_audio.py", line 35, in slice
    audio = load_audio(inp_path, 32000)
  File "/home/zhixuan/GPT-SoVITS/tools/my_utils.py", line 27, in load_audio
    raise RuntimeError(i18n("音频加载失败"))
RuntimeError: 音频加载失败
@chenkai89
Copy link

没有仔细查看代码,但是你可以跳过 load_audio 这个方法,在slice_audio 这个代码中,在循环里调用 load_audio方法,你可以在调用前增加是否文件的判断,如果是文件继续执行

@chenkai89
Copy link

@zhixuan45

@lucasmen9527
Copy link

可以看看这个 #2306 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants