gpt4 book ai didi

python - 读取wav文件时出现RuntimeError

转载 作者:行者123 更新时间:2023-12-03 09:00:56 28 4
gpt4 key购买 nike

我正在关注 https://github.com/mravanelli/SincNet图书馆 。我已按照建议遵循文档。但是我得到了 RuntimeError

我已经使用 sudo chmod +x/home/sathiyakugan/Downloads/TIMIT/data/lisa/data/timit/raw/TIMIT 更改了文件访问,但它没有解决问题。

这是我执行的语法python3 TIMIT_preparation.py/home/sathiyakugan/Downloads/TIMIT/data/lisa/data/timit/raw/TIMIT/home/sathiyakugan/Documents/FYP/out data_lists/TIMIT_all.scp

这是我收到的错误。

  File "TIMIT_preparation.py", line 56, in <module>
[signal, fs] = sf.read(wav_file)
File "/home/sathiyakugan/.local/lib/python3.6/site-packages/soundfile.py", line 257, in read
subtype, endian, format, closefd) as f:
File "/home/sathiyakugan/.local/lib/python3.6/site-packages/soundfile.py", line 627, in __init__
self._file = self._open(file, mode_int, closefd)
File "/home/sathiyakugan/.local/lib/python3.6/site-packages/soundfile.py", line 1182, in _open
"Error opening {0!r}: ".format(self.name))
File "/home/sathiyakugan/.local/lib/python3.6/site-packages/soundfile.py", line 1355, in _error_check
raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
RuntimeError: Error opening '/home/sathiyakugan/Downloads/TIMIT/data/lisa/data/timit/raw/TIMIT/train/dr1/fvmh0/si1466.wav': System error.

最佳答案

仔细检查路径是否存在权限问题或拼写错误。 SoundFile 模块打开与当前文件夹无关的文件,但需要文件的绝对路径。

关于python - 读取wav文件时出现RuntimeError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56755596/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com