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

Can't load voice in #395

Closed
TheAwesomeYT opened this issue Jul 3, 2020 · 7 comments
Closed

Can't load voice in #395

TheAwesomeYT opened this issue Jul 3, 2020 · 7 comments

Comments

@TheAwesomeYT
Copy link

Hey guys, whenever I try to load my voice sample, I keep getting either just
Exception:
or
Exception: expected str, bytes or os.PathLike object, not Nonetype
Please help!

@ghost
Copy link

ghost commented Jul 3, 2020

Try clicking the "Browse" button in the toolbox to load your own file.

The "Load" button only works if you have a dataset loaded.

@ghost ghost mentioned this issue Jul 3, 2020
@TheAwesomeYT
Copy link
Author

When I use "Browse", it just says 'Exception: '

@ghost
Copy link

ghost commented Jul 3, 2020

Can you copy and paste the error message and traceback from the terminal? We need more info to troubleshoot the issue.

@TheAwesomeYT
Copy link
Author

Sure, here you go:

Traceback (most recent call last):
  File "C:\Users\HP Pavilion\AppData\Local\Programs\Python\Python37\lib\site-packages\librosa\core\audio.py", line 129, in load
    with sf.SoundFile(path) as sf_desc:
  File "C:\Users\HP Pavilion\AppData\Local\Programs\Python\Python37\lib\site-packages\soundfile.py", line 629, in __init__
    self._file = self._open(file, mode_int, closefd)
  File "C:\Users\HP Pavilion\AppData\Local\Programs\Python\Python37\lib\site-packages\soundfile.py", line 1184, in _open
    "Error opening {0!r}: ".format(self.name))
  File "C:\Users\HP Pavilion\AppData\Local\Programs\Python\Python37\lib\site-packages\soundfile.py", line 1357, in _error_check
    raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
RuntimeError: Error opening 'D:\\cdfiles\\voicesamplecd.mp3': File contains data in an unknown format.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\HP Pavilion\Downloads\Real-Time-Voice-Cloning-master\toolbox\__init__.py", line 77, in <lambda>
    func = lambda: self.load_from_browser(self.ui.browse_file())
  File "C:\Users\HP Pavilion\Downloads\Real-Time-Voice-Cloning-master\toolbox\__init__.py", line 119, in load_from_browser
    wav = Synthesizer.load_preprocess_wav(fpath)
  File "C:\Users\HP Pavilion\Downloads\Real-Time-Voice-Cloning-master\synthesizer\inference.py", line 111, in load_preprocess_wav
    wav = librosa.load(str(fpath), hparams.sample_rate)[0]
  File "C:\Users\HP Pavilion\AppData\Local\Programs\Python\Python37\lib\site-packages\librosa\core\audio.py", line 162, in load
    y, sr_native = __audioread_load(path, offset, duration, dtype)
  File "C:\Users\HP Pavilion\AppData\Local\Programs\Python\Python37\lib\site-packages\librosa\core\audio.py", line 186, in __audioread_load
    with audioread.audio_open(path) as input_file:
  File "C:\Users\HP Pavilion\AppData\Local\Programs\Python\Python37\lib\site-packages\audioread\__init__.py", line 116, in audio_open
    raise NoBackendError()
audioread.exceptions.NoBackendError

@ghost
Copy link

ghost commented Jul 3, 2020

Take a look at librosa/librosa#219, you may need to install a backend.

Edit: The person who had this same issue in #386 resolved this by installing ffmpeg on windows.

@ghost
Copy link

ghost commented Jul 4, 2020

Closing issue as the "no backend" error is an issue with the user's configuration and not the repo code. If this did not fix your problem, please reopen the issue.

@ghost ghost closed this as completed Jul 4, 2020
This was referenced Jul 10, 2020
@Soul0702
Copy link

hey! i kept on getting this message each time i tries loading a sample audio file. please i need help

Screenshot (114)

File "C:\Users\PC\Desktop\voice\toolbox_init_.py", line 94, in
func = lambda: self.load_from_browser(self.ui.browse_file())
File "C:\Users\PC\Desktop\voice\toolbox_init_.py", line 160, in load_from_browser
self.add_real_utterance(wav, name, speaker_name)
File "C:\Users\PC\Desktop\voice\toolbox_init_.py", line 180, in add_real_utterance
encoder_wav = encoder.preprocess_wav(wav)
File "C:\Users\PC\Desktop\voice\encoder\audio.py", line 48, in preprocess_wav
wav = trim_long_silences(wav)
File "C:\Users\PC\Desktop\voice\encoder\audio.py", line 83, in trim_long_silences
pcm_wave = struct.pack("%dh" % len(wav), *(bool(wav * int16_max)).astype(np.int16))
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

This issue was closed.
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