Open roedoejet opened 2 months ago
Hi @roedoejet,
The sox backend does not support file-like objects, which has been stated in the documentation. https://pytorch.org/audio/2.1.0/torchaudio.html Would recommend you use either ffmpeg or soundfile as the backend.
🐛 Describe the bug
Running the following:
Produces the following error:
But my understanding from the torchaudio.load type signature is that a pathlib.Path should be accepted here.
Versions
PyTorch version: 2.1.0 Is debug build: False CUDA used to build PyTorch: None ROCM used to build PyTorch: N/A
OS: macOS 12.5.1 (arm64) GCC version: Could not collect Clang version: 14.0.0 (clang-1400.0.29.202) CMake version: Could not collect Libc version: N/A
Python version: 3.10.13 (main, Sep 11 2023, 08:16:02) [Clang 14.0.6 ] (64-bit runtime) Python platform: macOS-12.5.1-arm64-arm-64bit Is CUDA available: False CUDA runtime version: No CUDA CUDA_MODULE_LOADING set to: N/A GPU models and configuration: No CUDA Nvidia driver version: No CUDA cuDNN version: No CUDA HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: True
CPU: Apple M1 Pro
Versions of relevant libraries: [pip3] flake8==7.0.0 [pip3] mypy==1.8.0 [pip3] mypy-extensions==1.0.0 [pip3] numpy==1.26.4 [pip3] pytorch-lightning==2.2.0.post0 [pip3] torch==2.1.0 [pip3] torchaudio==2.1.0 [pip3] torchinfo==1.8.0 [pip3] torchmetrics==1.3.1 [conda] numpy 1.26.4 pypi_0 pypi [conda] pytorch-lightning 2.2.0.post0 pypi_0 pypi [conda] torch 2.1.0 pypi_0 pypi [conda] torchaudio 2.1.0 pypi_0 pypi [conda] torchinfo 1.8.0 pypi_0 pypi [conda] torchmetrics 1.3.1 pypi_0 pypi