在文件路径上实现torchaudio.info时,我将得到与文档中指定的不同的返回。
这里的代码返回<torchaudio.backend.common.AudioMetaData object at 0x000001908CFB3B20>
tempFile = os.path.join(audio_dir,'1','121007.wav')
metadata=torchaudio.info(tempFile)
print(metadata)当我需要按文档指定的方式返回以下表单时
AudioMetaData(sample_rate=44100, num_frames=109368, num_channels=2, bits_per_sample=16, encoding=PCM_S)发布于 2022-07-19 17:05:09
可能是版本问题。v0.8不采用__str__法。它是在0.9版中添加的。
https://stackoverflow.com/questions/69937021
复制相似问题