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

failed to run demo #45

Closed
wolf-joe opened this issue Jan 4, 2024 · 4 comments
Closed

failed to run demo #45

wolf-joe opened this issue Jan 4, 2024 · 4 comments

Comments

@wolf-joe
Copy link

wolf-joe commented Jan 4, 2024

  • clone project
  • install conda & dependencies
  • run demo_part1.ipynb
  • then i got an error:
reference_speaker = 'resources/example_reference.mp3'
target_se, audio_name = se_extractor.get_se(reference_speaker, tone_color_converter, target_dir='processed', vad=True)
---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
File ~/miniconda3/envs/openvoice/lib/python3.9/site-packages/whisper_timestamped/transcribe.py:1885, in get_vad_segments(audio, output_sample, min_speech_duration, min_silence_duration, dilatation, method)
   1884 try:
-> 1885     _silero_vad_model, utils = torch.hub.load(repo_or_dir=repo_or_dir, model="silero_vad", onnx=onnx, source=source)
   1886 except ImportError as err:

File ~/miniconda3/envs/openvoice/lib/python3.9/site-packages/torch/hub.py:539, in load(repo_or_dir, model, source, trust_repo, force_reload, verbose, skip_validation, *args, **kwargs)
    538 if source == 'github':
--> 539     repo_or_dir = _get_cache_or_reload(repo_or_dir, force_reload, trust_repo, "load",
    540                                        verbose=verbose, skip_validation=skip_validation)
    542 model = _load_local(repo_or_dir, model, *args, **kwargs)

File ~/miniconda3/envs/openvoice/lib/python3.9/site-packages/torch/hub.py:203, in _get_cache_or_reload(github, force_reload, trust_repo, calling_fn, verbose, skip_validation)
    202 if not skip_validation:
--> 203     _validate_not_a_forked_repo(repo_owner, repo_name, ref)
    205 cached_file = os.path.join(hub_dir, normalized_br + '.zip')

File ~/miniconda3/envs/openvoice/lib/python3.9/site-packages/torch/hub.py:162, in _validate_not_a_forked_repo(repo_owner, repo_name, ref)
    161 url = f'{url_prefix}?per_page=100&page={page}'
--> 162 response = json.loads(_read_url(Request(url, headers=headers)))
    163 # Empty response means no more data to process

File ~/miniconda3/envs/openvoice/lib/python3.9/site-packages/torch/hub.py:145, in _read_url(url)
    144 def _read_url(url):
...
-> 1889     raise RuntimeError(f"Problem when installing silero with version {version}. Check versions here: https://github.com/snakers4/silero-vad/wiki/Version-history-and-Available-Models") from err
   1890 finally:
   1891     if need_folder_hack:

RuntimeError: Problem when installing silero with version None. Check versions here: https://github.com/snakers4/silero-vad/wiki/Version-history-and-Available-Models
@yuxumin
Copy link
Collaborator

yuxumin commented Jan 4, 2024

It looks like there may be an issue caused by HTTP timeout, possibly due to the server experiencing a lack of response when accessing GitHub.

@wolf-joe
Copy link
Author

wolf-joe commented Jan 4, 2024

It looks like there may be an issue caused by HTTP timeout, possibly due to the server experiencing a lack of response when accessing GitHub.

i try to run demo code directly, then i got exception detail: 401 error.

Traceback (most recent call last):
  File "/home/worker/miniconda3/envs/openvoice/lib/python3.9/site-packages/whisper_timestamped/transcribe.py", line 1885, in get_vad_segments
    _silero_vad_model, utils = torch.hub.load(repo_or_dir=repo_or_dir, model="silero_vad", onnx=onnx, source=source)
  File "/home/worker/miniconda3/envs/openvoice/lib/python3.9/site-packages/torch/hub.py", line 539, in load
    repo_or_dir = _get_cache_or_reload(repo_or_dir, force_reload, trust_repo, "load",
  File "/home/worker/miniconda3/envs/openvoice/lib/python3.9/site-packages/torch/hub.py", line 203, in _get_cache_or_reload
    _validate_not_a_forked_repo(repo_owner, repo_name, ref)
  File "/home/worker/miniconda3/envs/openvoice/lib/python3.9/site-packages/torch/hub.py", line 162, in _validate_not_a_forked_repo
    response = json.loads(_read_url(Request(url, headers=headers)))
  File "/home/worker/miniconda3/envs/openvoice/lib/python3.9/site-packages/torch/hub.py", line 145, in _read_url
    with urlopen(url) as r:
  File "/home/worker/miniconda3/envs/openvoice/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/home/worker/miniconda3/envs/openvoice/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/home/worker/miniconda3/envs/openvoice/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/home/worker/miniconda3/envs/openvoice/lib/python3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/home/worker/miniconda3/envs/openvoice/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/home/worker/miniconda3/envs/openvoice/lib/python3.9/urllib/request.py", line 642, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/worker/git/OpenVoice/test.py", line 26, in <module>
    target_se, audio_name = se_extractor.get_se(
  File "/home/worker/git/OpenVoice/se_extractor.py", line 130, in get_se
    wavs_folder = split_audio_vad(audio_path, target_dir)
  File "/home/worker/git/OpenVoice/se_extractor.py", line 75, in split_audio_vad
    segments = get_vad_segments(
  File "/home/worker/miniconda3/envs/openvoice/lib/python3.9/site-packages/whisper_timestamped/transcribe.py", line 1889, in get_vad_segments
    raise RuntimeError(f"Problem when installing silero with version {version}. Check versions here: https://github.com/snakers4/silero-vad/wiki/Version-history-and-Available-Models") from err
RuntimeError: Problem when installing silero with version None. Check versions here: https://github.com/snakers4/silero-vad/wiki/Version-history-and-Available-Models

@wolf-joe
Copy link
Author

wolf-joe commented Jan 4, 2024

Based on the information from the 401 error in the code, I printed the URL that caused the 401 error and obtained the following address: https://api.github.com/repos/snakers4/silero-vad/branches?per_page=100&page=1. However, strangely, when I accessed this URL locally using curl, I received a normal 200 response.

@wolf-joe
Copy link
Author

wolf-joe commented Jan 4, 2024

I found the reason. There is an invalid GITHUB_TOKEN in my environment variables.

@wolf-joe wolf-joe closed this as completed Jan 4, 2024
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

2 participants