CorentinJ / Real-Time-Voice-Cloning

Clone a voice in 5 seconds to generate arbitrary speech in real-time
Other
52.85k stars 8.81k forks source link

Toolbox can't vocode. #386

Closed bllurr closed 4 years ago

bllurr commented 4 years ago

So... I have managed to successfully install the toolbox with other components as well such as CUDA, cuDNN, Pytorch, and pre-trained models. I opened the toolbox and record my own voice, but when I click synthesize and vocode, nothing happens on the toolbox, but in cmd, there is an error message:

Traceback (most recent call last):
  File "C:\Users\fcbge\Downloads\Real-Time-Voice-Cloning-master\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\fcbge\Downloads\Real-Time-Voice-Cloning-master\Real-Time-Voice-Cloning-master\toolbox\__init__.py", line 119, in load_from_browser
    wav = Synthesizer.load_preprocess_wav(fpath)
  File "C:\Users\fcbge\Downloads\Real-Time-Voice-Cloning-master\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\fcbge\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\fcbge\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\fcbge\AppData\Local\Programs\Python\Python37\lib\site-packages\audioread\__init__.py", line 116, in audio_open
    raise NoBackendError()
audioread.exceptions.NoBackendError
ghost commented 4 years ago

Have you tried demo_cli.py? I have never used the toolbox. Likely some part of it needs to be updated for compatibility with the recent changes.

ghost commented 4 years ago

Take a look at https://github.com/librosa/librosa/issues/219, you may need to install a backend.

bllurr commented 4 years ago

@blue-fish now this happens after i installed ffmpeg:

Traceback (most recent call last):
  File "C:\Users\fcbge\Downloads\Real-Time-Voice-Cloning-master\Real-Time-Voice-Cloning-master\toolbox\__init__.py", line 87, in <lambda>
    func = lambda: self.synthesize() or self.vocode()
  File "C:\Users\fcbge\Downloads\Real-Time-Voice-Cloning-master\Real-Time-Voice-Cloning-master\toolbox\__init__.py", line 173, in synthesize
    specs = self.synthesizer.synthesize_spectrograms(texts, embeds)
  File "C:\Users\fcbge\Downloads\Real-Time-Voice-Cloning-master\Real-Time-Voice-Cloning-master\synthesizer\inference.py", line 77, in synthesize_spectrograms
    self.load()
  File "C:\Users\fcbge\Downloads\Real-Time-Voice-Cloning-master\Real-Time-Voice-Cloning-master\synthesizer\inference.py", line 58, in load
    self._model = Tacotron2(self.checkpoint_fpath, hparams)
  File "C:\Users\fcbge\Downloads\Real-Time-Voice-Cloning-master\Real-Time-Voice-Cloning-master\synthesizer\tacotron2.py", line 59, in __init__
    self.session = tf.compat.v1.Session(config=config)
  File "C:\Users\fcbge\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1585, in __init__
    super(Session, self).__init__(target, graph, config=config)
  File "C:\Users\fcbge\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 699, in __init__
    self._session = tf_session.TF_NewSessionRef(self._graph._c_graph, opts)
tensorflow.python.framework.errors_impl.InternalError: cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version
ghost commented 4 years ago

Which version of tensorflow are you using? If it is 1.15 may I suggest that you use demo_cli.py until the toolbox is updated to offer CPU support.

To use tensorflow on GPU requires a specific CUDA driver version to be installed. tensorflow==1.15 requires CUDA 10.0. https://www.tensorflow.org/install/source_windows#gpu

bllurr commented 4 years ago

I tried option no 2 but it shows the same error, I want to try option 1 but how do you use the CPU option? @blue-fish

ghost commented 4 years ago

python demo_cli.py --cpu

bllurr commented 4 years ago

@blue-fish I tried that but this happens:

Traceback (most recent call last):
  File "demo_cli.py", line 95, in <module>
    mels = synthesizer.synthesize_spectrograms(texts, embeds)
  File "C:\Users\fcbge\Downloads\Real-Time-Voice-Cloning-master\Real-Time-Voice-Cloning-master\synthesizer\inference.py", line 77, in synthesize_spectrograms
    self.load()
  File "C:\Users\fcbge\Downloads\Real-Time-Voice-Cloning-master\Real-Time-Voice-Cloning-master\synthesizer\inference.py", line 58, in load
    self._model = Tacotron2(self.checkpoint_fpath, hparams)
  File "C:\Users\fcbge\Downloads\Real-Time-Voice-Cloning-master\Real-Time-Voice-Cloning-master\synthesizer\tacotron2.py", line 59, in __init__
    self.session = tf.compat.v1.Session(config=config)
  File "C:\Users\fcbge\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 1585, in __init__
    super(Session, self).__init__(target, graph, config=config)
  File "C:\Users\fcbge\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\client\session.py", line 699, in __init__
    self._session = tf_session.TF_NewSessionRef(self._graph._c_graph, opts)
tensorflow.python.framework.errors_impl.InternalError: cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version
ghost commented 4 years ago

I'm about out of ideas...

  1. Try uninstalling tensorflow-gpu
  2. What GPU do you have?
  3. Can you list out your installed packages and their versions? If you are using pip or conda, pip list or conda list will return this information.
ghost commented 4 years ago

Hi @bllurr , did you get it to work?

ghost commented 4 years ago

The last issue is a duplicate of #321 (no solution posted). If you were able to get past that step would you please share your solution?

ghost commented 4 years ago

You might also want to check out #398 as an potential alternative if you continue to have issues with the setup.

ghost commented 4 years ago

Hi @bllurr , I am closing this issue because it has not been updated in a while. I hope you were able to get the toolbox to work. It would be nice to know the current status. Feel free to reopen this issue if you have any questions or comments.

sahil-dhuri commented 2 years ago

yaa, m to facing same argument problem image