Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: torchaudio::sox_io_load_audio_file() Expected a value of type 'str' for argument '_0' but instead found type 'PosixPath'. #48

Open
stephane-archer opened this issue Sep 17, 2024 · 0 comments

Comments

@stephane-archer
Copy link

I'm on MacOS using python 3.10

resemble-enhance /Users/fractale/Movies/denoisetest/ /Users/fractale/Movies/renoiseOUT/                                                     (resemble)
[2024-09-17 09:43:33,776] [INFO] [real_accelerator.py:161:get_accelerator] Setting ds_accelerator to mps (auto detect)
[2024-09-17 09:43:34,344] torch.distributed.elastic.multiprocessing.redirects: [WARNING] NOTE: Redirects are currently not supported in Windows or MacOs.
Processing /Users/fractale/Movies/renoiseOUT/IMG_4163.wav:   0%|                                                                                            | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/usr/local/anaconda3/envs/resemble/bin/resemble-enhance", line 8, in <module>
    sys.exit(main())
  File "/usr/local/anaconda3/envs/resemble/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/anaconda3/envs/resemble/lib/python3.10/site-packages/resemble_enhance/enhancer/__main__.py", line 94, in main
    dwav, sr = torchaudio.load(path)
  File "/usr/local/anaconda3/envs/resemble/lib/python3.10/site-packages/torchaudio/_backend/utils.py", line 204, in load
    return backend.load(uri, frame_offset, num_frames, normalize, channels_first, format, buffer_size)
  File "/usr/local/anaconda3/envs/resemble/lib/python3.10/site-packages/torchaudio/_backend/sox.py", line 42, in load
    ret = torch.ops.torchaudio.sox_io_load_audio_file(
  File "/usr/local/anaconda3/envs/resemble/lib/python3.10/site-packages/torch/_ops.py", line 692, in __call__
    return self._op(*args, **kwargs or {})
RuntimeError: torchaudio::sox_io_load_audio_file() Expected a value of type 'str' for argument '_0' but instead found type 'PosixPath'.
Position: 0
Value: PosixPath('/Users/fractale/Movies/denoisetest/IMG_4163.wav')
Declaration: torchaudio::sox_io_load_audio_file(str _0, int? _1, int? _2, bool? _3, bool? _4, str? _5) -> (Tensor _0, int _1)
Cast error details: Unable to cast Python instance of type <class 'pathlib.PosixPath'> to C++ type '?' (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant