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

[Bug]: Windows saving of hugging face models fails due to using the / Override on a WindowsPath Object #1885

Open
dsamford opened this issue Mar 15, 2023 · 0 comments · May be fixed by #2476
Labels
bug Something isn't working

Comments

@dsamford
Copy link

Describe the bug

Hugging Face models can't be downloaded using fetching.py

Expected behaviour

The destination variable is initialized correctly on windows.

To Reproduce

vad_model = VAD.from_hparams(source="speechbrain/vad-crdnn-libriparty", savedir="pretrained_models/vad-crdnn-libriparty")

Versions

Name: speechbrain
Version: 0.5.13
Summary: All-in-one speech toolkit in pure Python and Pytorch
Home-page: https://speechbrain.github.io/
Author: Mirco Ravanelli & Others
Author-email: speechbrain@gmail.com
License:
Location: c:\users\dsamf\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
Requires: huggingface-hub, hyperpyyaml, joblib, numpy, packaging, scipy, sentencepiece, torch, torchaudio, tqdm
Required-by:

Relevant log output

Exception in thread Thread-3 (process_audio_stream):
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "D:\Development\llm\whisper\aivsai.py", line 179, in process_audio_stream
    boundaries = vad_model.get_speech_segments(audio_buffer)
  File "C:\Users\dsamf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\speechbrain\pretrained\interfaces.py", line 1892, in get_speech_segments
    audio_file = fetch(fl, source=source)
  File "C:\Users\dsamf\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\speechbrain\pretrained\fetching.py", line 88, in fetch
    destination = savedir / save_filename
TypeError: unsupported operand type(s) for /: 'WindowsPath' and 'int'

Additional context

No response

@dsamford dsamford added the bug Something isn't working label Mar 15, 2023
@asumagic asumagic linked a pull request Mar 27, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant