python - 由于 : file does not start with RIFF id,无法将文件 file.wav 作为 WAV 打开

标签 python mime-types wav riff

尝试在 Python 中打开 RIFF 文件(据我所知,它是一种 WAV)时出现此错误。

Failed to open file file.wav as a WAV due to: file does not start with RIFF id

当我用各种工具检查该文件时,它让我相信它一个 WAV/RIFF 文件。

$ file file.wav 
file.wav: MBWF/RF64 audio, stereo 96000 Hz


$ file -i file.wav 
file.wav: audio/x-wav; charset=binary




$ mediainfo file.wav 
General
Complete name                            : file.wav
Format                                   : Wave
Format profile                           : RF64
File size                                : 4.10 GiB
Duration                                 : 2h 7mn
Overall bit rate mode                    : Constant
Overall bit rate                         : 4 608 Kbps

Audio
Format                                   : PCM
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : 1
Duration                                 : 2h 7mn
Bit rate mode                            : Constant
Bit rate                                 : 4 608 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 96.0 KHz
Bit depth                                : 24 bits
Stream size                              : 4.10 GiB (100%)

最佳答案

你有一个 64-bit RIFF . wave 不支持 64 位 RIFF 文件。

关于python - 由于 : file does not start with RIFF id,无法将文件 file.wav 作为 WAV 打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25672289/

相关文章:

java - 如何从 wav 文件中获取 PCM 数据?

C: WAV 文件未在 "rb"中打开

python - 用 Gooey 解析列表

email - 如何发送行超过 990 个字符的 csv 附件?

android - 基于android中的文件启动Activity

audio - WAV "data"子 block 是如何构成的?

python 的 re : replace regex to regex

python - 在 xarray 中替换数据集坐标 (Python)

python - 如何防止 lark 将标识符的一部分识别为关键字?

jakarta-ee - Wildfly Undertow 文件 Mimetypes