Check if libsndfile is available by importing soundfile (#1718)
`torchaudio` treats `soundfile` as an optional dependency, and it assumes either `soundfile` is properly installed or it is not installed at all. However, there is a third state where `soundfile` is installed but the backing library `libsndfile` is not installed, and in this case, `import torchaudio` fails. This commit resolves it by further checking if `soundfile` is importable. See also: https://github.com/pytorch/audio/issues/1687
Showing
Please register or sign in to comment