RuntimeError when reading wav file(读取wav文件时出现运行错误)
本文介绍了读取wav文件时出现运行错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在跟踪https://github.com/mravanelli/SincNet库。我已经按照建议遵循了文档。但我收到运行错误
我已使用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模块打开的文件与当前文件夹无关,但需要文件的绝对路径。
这篇关于读取wav文件时出现运行错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
沃梦达教程
本文标题为:读取wav文件时出现运行错误
基础教程推荐
猜你喜欢
- 症状类型错误:无法确定关系的真值 2022-01-01
- 使 Python 脚本在 Windows 上运行而不指定“.py";延期 2022-01-01
- 使用 Google App Engine (Python) 将文件上传到 Google Cloud Storage 2022-01-01
- 将 YAML 文件转换为 python dict 2022-01-01
- 合并具有多索引的两个数据帧 2022-01-01
- 如何在Python中绘制多元函数? 2022-01-01
- Python 的 List 是如何实现的? 2022-01-01
- 使用Python匹配Stata加权xtil命令的确定方法? 2022-01-01
- 哪些 Python 包提供独立的事件系统? 2022-01-01
- 如何在 Python 中检测文件是否为二进制(非文本)文 2022-01-01