CorentinJ / Real-Time-Voice-Cloning

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

Abort when python demo_toolbox.py #11

Closed Interfish closed 5 years ago

Interfish commented 5 years ago

Hi: I am trying to run your code on a centos server with X11 forwarding open. But when I try python demo_toolbox dataset , it prints

Arguments:
    datasets_root:    dataset
    enc_models_dir:   encoder/saved_models
    syn_models_dir:   synthesizer/saved_models
    voc_models_dir:   vocoder/saved_models
Aborted

I believe I installed all required packages. Looks like the error is not caused by python but some low level call. So is there any way to print more error message? Or is there any way to run without GUI ? (I think although I open X11 forward on this server but it still might not fit as good as a pure GUI machine).

Thanks!

CorentinJ commented 5 years ago

I had planned to make a GUI-less demo inference script for a while, but really its only purpose would be to show you how to interface the models with your code. Essentially it comes down to making calls to the three <model>/inference.py scripts I wrote for each model. You can read their current documentation and refer to how they're used in the toolbox to implement it yourself.

Either way I'll be writing that script in two days I think (currently have exams to pass). I'm still thinking about how I want to do it.

As for the GUI problem, I'm sorry but I just don't know enough on that topic to help you. Your guess is a good as mine.

CorentinJ commented 5 years ago

Hey @Interfish, I've added this stub to allow for quick debugging without a GUI. Can you test and see if it runs? I'll implement an interactive way of doing inference later on.

DrStoop commented 5 years ago

Hi @CorentinJ, I am facing exactly the same problem as @Interfish on my local machine. and I tested your demo_cli.py. The test passes though, see attachment below.

I tracked the error with faulthandler down to class UI(QDialog).__init__():

Connected to pydev debugger (build 191.7479.30)
Arguments:
    datasets_root:    /home/developer/data/datasets
    enc_models_dir:   data/models/encoder/saved_models
    syn_models_dir:   data/models/synthesizer/saved_models
    voc_models_dir:   data/models/vocoder/saved_models

Fatal Python error: Aborted

Thread 0x00007ff44b7c9700 (most recent call first):
  File "/conda/envs/rapids/lib/python3.6/threading.py", line 299 in wait
  File "/conda/envs/rapids/lib/python3.6/threading.py", line 551 in wait
  File "/opt/pycharm-2019.1.3/helpers/pydev/pydevd.py", line 128 in _on_run
  File "/opt/pycharm-2019.1.3/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 321 in run
  File "/conda/envs/rapids/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/conda/envs/rapids/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007ff44bfca700 (most recent call first):
  File "/opt/pycharm-2019.1.3/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 383 in _on_run
  File "/opt/pycharm-2019.1.3/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 321 in run
  File "/conda/envs/rapids/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/conda/envs/rapids/lib/python3.6/threading.py", line 884 in _bootstrap

Thread 0x00007ff44c7cb700 (most recent call first):
  File "/conda/envs/rapids/lib/python3.6/threading.py", line 299 in wait
  File "/conda/envs/rapids/lib/python3.6/queue.py", line 173 in get
  File "/opt/pycharm-2019.1.3/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 460 in _on_run
  File "/opt/pycharm-2019.1.3/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 321 in run
  File "/conda/envs/rapids/lib/python3.6/threading.py", line 916 in _bootstrap_inner
  File "/conda/envs/rapids/lib/python3.6/threading.py", line 884 in _bootstrap

Current thread 0x00007ff460371740 (most recent call first):
  File "/home/developer/toolbox/ui.py", line 344 in __init__
  File "/home/developer/toolbox/__init__.py", line 38 in __init__
  File "/home/developer/demo_toolbox.py", line 31 in <module>
  File "/opt/pycharm-2019.1.3/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18 in execfile
  File "/opt/pycharm-2019.1.3/helpers/pydev/pydevd.py", line 1147 in run
  File "/opt/pycharm-2019.1.3/helpers/pydev/pydevd.py", line 1752 in main
  File "/opt/pycharm-2019.1.3/helpers/pydev/pydevd.py", line 1758 in <module>

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

The error occurs in File "/toolbox/ui.py", line 344 in __init__ due to QDialog or QApplication initialization:

class UI(QDialog):
...
...
...
    def __init__(self):
        ## Initialize the application
        self.app = QApplication(sys.argv)
        super().__init__(None)
        self.setWindowTitle("SV2TTS toolbox")

I don't know PyQt5 so I couldn't debug it so far. Any ideas? Still working on it...

Cheers!

Attachment:

This is a UI-less example of interface to SV2TTS. The purpose of this script is to show how you can interface this project easily with your own. See the source code for an explanation of what is happening.

Arguments:
    enc_model_fpath:   data/models/encoder/saved_models/pretrained.pt
    syn_model_dir:     data/models/synthesizer/saved_models/logs-pretrained
    voc_model_fpath:   data/models/vocoder/saved_models/pretrained/pretrained.pt
    no_sound:          False

Found 1 GPUs available. Using GPU 0 (GeForce GTX 1080) of compute capability 6.1 with 8.5Gb total memory.

Loading the encoder, the synthesizer and the vocoder. This should take a few seconds. The synthesizer will output a lot of stuff. Tensorflow is like that.
Loaded encoder "pretrained.pt" trained to step 1564501
Constructing model: Tacotron
WARNING:tensorflow:From /home/developer/synthesizer/models/tacotron.py:86: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, use
    tf.py_function, which takes a python function which manipulates tf eager
    tensors instead of numpy arrays. It's easy to convert a tf eager tensor to
    an ndarray (just call tensor.numpy()) but having access to eager tensors
    means `tf.py_function`s can use accelerators such as GPUs as well as
    being differentiable using a gradient tape.

WARNING:tensorflow:From /conda/envs/rapids/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From /home/developer/synthesizer/models/modules.py:112: LSTMCell.__init__ (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This class is equivalent as tf.keras.layers.LSTMCell, and will be replaced by that in Tensorflow 2.0.
WARNING:tensorflow:From /home/developer/synthesizer/models/modules.py:421: conv1d (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.conv1d instead.
WARNING:tensorflow:From /home/developer/synthesizer/models/modules.py:422: batch_normalization (from tensorflow.python.layers.normalization) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.batch_normalization instead.
WARNING:tensorflow:From /home/developer/synthesizer/models/modules.py:425: dropout (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.dropout instead.
WARNING:tensorflow:From /home/developer/synthesizer/models/modules.py:236: bidirectional_dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.
Instructions for updating:
Please use `keras.layers.Bidirectional(keras.layers.RNN(cell))`, which is equivalent to this API
WARNING:tensorflow:From /conda/envs/rapids/lib/python3.6/site-packages/tensorflow/python/ops/rnn.py:443: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.
Instructions for updating:
Please use `keras.layers.RNN(cell)`, which is equivalent to this API
WARNING:tensorflow:From /conda/envs/rapids/lib/python3.6/site-packages/tensorflow/python/ops/rnn.py:626: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
WARNING:tensorflow:From /home/developer/synthesizer/models/modules.py:305: MultiRNNCell.__init__ (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replaced by that in Tensorflow 2.0.
WARNING:tensorflow:From /home/developer/synthesizer/models/modules.py:269: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.
Instructions for updating:
Use keras.layers.dense instead.
WARNING:tensorflow:From /conda/envs/rapids/lib/python3.6/site-packages/tensorflow/python/keras/layers/core.py:143: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.
initialisation done /gpu:0
Initialized Tacotron model. Dimensions (? = dynamic shape): 
  Train mode:               False
  Eval mode:                False
  GTA mode:                 False
  Synthesis mode:           True
  Input:                    (?, ?)
  device:                   0
  embedding:                (?, ?, 512)
  enc conv out:             (?, ?, 512)
  encoder out (cond):       (?, ?, 768)
  decoder out:              (?, ?, 80)
  residual out:             (?, ?, 512)
  projected residual out:   (?, ?, 80)
  mel out:                  (?, ?, 80)
  <stop_token> out:         (?, ?)
  Tacotron Parameters       28.439 Million.
Loading checkpoint: data/models/synthesizer/saved_models/logs-pretrained/taco_pretrained/tacotron_model.ckpt-278000
WARNING:tensorflow:From /conda/envs/rapids/lib/python3.6/site-packages/tensorflow/python/training/saver.py:1266: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
Loaded synthesizer "pretrained" trained to step 278000
Building Wave-RNN
Trainable Parameters: 4.481M
Loading model weights at data/models/vocoder/saved_models/pretrained/pretrained.pt

All models succesfully loaded!

Testing your configuration with small inputs.
    Testing the encoder...
    Testing the synthesizer...
    Testing the vocoder...
All test passed! You can now synthesize speech.

Process finished with exit code 0
DrStoop commented 5 years ago

Enable Qt-Debug $ export QT_DEBUG_PLUGINS=1 ==> reproduce error ==> re/install the No such file or directory-library listed in debug message ==> repeat!

System

I am running my PyQt5-application in a Docker container with shared /tmp/.X11-unix/ socket and display for GUI visualization:

$ nividia-docker run --interactive --tty --env DISPLAY=$DISPLAY --volume /tmp/.X11-unix/:/tmp/.X11-unix/ <docker_iamge>

Error

Initializing PyQt5.QtWidgets.QApplication led to following error:

Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5.QtWidgets import QApplication
>>> app = QApplication([])
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)

In PyCharm Debug mode the error returned:

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

Solution

General method:

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)

 - find the `<No such file or directory>.so.*` and `<coud not be loaded>`-packages, here e.g. `libxkbcommon-x11.so.0` and `libxcb`. Then re/install the corresponding packages/libraries (finding the packages works with `apt-file --package-only search <filename>` or `conda/pip search ...`). In my case the following libs were required:
```bash
### lib no.1 ###
$ sudo conda install --name <env_name> --force-reinstall libxcb    # or pip install ...
### lib no. 2 ###
$ apt-file --package-only search libxkbcommon-x11.so.0
libxkbcommon-x11-0
$ sudo apt install libxkbcommon-x11-0 

After repeating this process for all sequentially reproduced debug messages and installing the 2 libs I can now run PyQt5-apps from inside the Docker container on my local machine desktop.

CorentinJ commented 5 years ago

Hey @DrStoop, sorry for the late reply, I was away for a while.

What I understand is that you managed to get the toolbox to work through X11? If so, I could link your comment in the readme for other users who might face the same issue. It looks to me that there isn't much that I can change to the code that would have helped, what do you reckon? @Interfish, does this solve your issue as well?

DrStoop commented 5 years ago

@CorentinJ that's correct, I did not touch your code and I am running SV2TTS-toolbox in a docker container with the GUI through shared X11 on my host desktop. Whereas I should mention that I connected the mic and speakers through shared /dev/snd with the sounddriver packages alsa-base and also-utils installed in the container (plus appending audio-group to the container user). So together with the speaker & mic I got full functionality... sure, feel free to link the comment :).

Interfish commented 5 years ago

@CorentinJ Sorry for late reply, i will try it now and feed back the result

Interfish commented 5 years ago

@CorentinJ By the way, what's the total GPU memory this code consume? I currently run on a 4gb GPU but CUDA out of memory?

CorentinJ commented 5 years ago

You're fine with 4gb if you don't put too long sentences. I'm currently experimenting with implementing low-memory inference to work around that but it's always a tricky thing to know in advance how much VRAM you'll need for an operation and how much is available...

Interfish commented 5 years ago

@CorentinJ Hi, I try your new code and it worked! Thanks for the great job, I really like your art of coding and necessary comments. I am now trying to manipulate the code to run fine-tuning. Maybe I can finally submit a version to run the full function as demo_toolbox.py does with CLI.

MorganCZY commented 5 years ago

I am trying to run demo_toolbox.py on a server(Ubuntu 16.04.4 LTS), but the same problem occurs to me. image I didn't get the method to fix it even after reading your discussions. Could you simply tell me what should I do or what else should be installed?

DrStoop commented 5 years ago

Hi @MorganCZY, have you set the environment variable in your terminal with the command export QT_DEBUG_PLUGINS=1? Your output still does not include any pyqt-debug messages which tell you what libraries couldn't be found and need installing (e.g. proposed here or here). Just set the qt-debug-flag in your terminal with the command

$ export QT_DEBUG_PLUGINS=1

and rerun the demo_toolbox.py in the same terminal. This should return a lot of debug messages as listed above and you can proceed with the solution also described there (finding missing libs, installing missing libs, rerun, repeat). Hope that helps!

MorganCZY commented 5 years ago

@DrStoop Following your guidance, I didn't get more debug info. image Do I correctly and fully get your point?

MorganCZY commented 5 years ago

I wrote a piece of simple code to create a window, but getting an error"qt.qpa.screen: QXcbConnection: Could not connect to display Could not connect to any X display." image Does it mean this server has no tools for displaying GUI codes. If so, what should I install?

DrStoop commented 5 years ago

@MorganCZY, you got that right, it is exactly how I turned on the debug mode, just the output looked different :)...

To provoke the error I did not run the full demo_toolbox.py script but just a small code snippet what you also just tried. As I tracked down the error to QApplication() before with faulthandler I caused the errors in a Python console with this small code snippet from the description above, so I didn't have to rerun the full toolbox (q&d):

$ python
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5.QtWidgets import QApplication, QLabel
>>> app = QApplication([])

Possibly you don't need GUI support for this snippet, but I cannot really tell.

Regarding your GUI-issue, I also can't really tell from here how your system looks like. In case you're using a Docker container, take a look at this description to enable GUIs on your host desktop.

xw1324832579 commented 5 years ago

Hi @DrStoop @CorentinJ
I tested PyQt5 within a docker env, but the same error occurs to me. Details are showing in the following picture. image The errors are presented in the bellow: image I succeeded in installing libxcb as your instructions. Could you give me some guidance?

DrStoop commented 5 years ago

@xw1324832579 the first error complains it cannot connect to display :0. have you shared the X11-unix socket as volume in the docker run command and adjusted your image build for GUI applications as I mentioned with a link at the end of my comment? this should solve the first & possibly the follow-up errors...

freecui commented 5 years ago

Hi: I am trying to run your code on a ubuntu server . But when I try python3 demo_toolbox.py , it prints Arguments: datasets_root: None enc_models_dir: encoder/saved_models syn_models_dir: synthesizer/saved_models voc_models_dir: vocoder/saved_models low_mem: False

Aborted (core dumped)

and I can run python demo_cli.py successfully; and I have tested without a GUI, but the same error; is this the result of not sending data?

Abhi3daxe commented 5 years ago

Hi Guys,

I am trying to run demo_toolbox.py but getting an error:

"Cannot mix incompatible Qt library (version 0x50602) with this library (version 0x50d00)"

I am using a windows 10 laptop and not sure how to fix this error. Can someone please help me with this.

Thanks.

CorentinJ commented 5 years ago

What's your pyqt version? You can try to install 5.12.2, the same as mine.

Abhi3daxe commented 5 years ago

Hi Corentin,

My pyqt version is 5.13.0.

I tried to install the pyqt version 5.12.2 but still the program wont run. Not sure what the problem is.

Hope you can help.

Thanks

On Wed., Sep. 11, 2019, 03:59 Corentin Jemine, notifications@github.com wrote:

What's your pyqt version? You can try to install 5.12.2, the same as mine.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CorentinJ/Real-Time-Voice-Cloning/issues/11?email_source=notifications&email_token=ANC53LQNU3DFEMWRZFAOMATQJCQNFA5CNFSM4HZFN7D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6NT6AQ#issuecomment-530267906, or mute the thread https://github.com/notifications/unsubscribe-auth/ANC53LWY7IKIROVIQAQNFXDQJCQNFANCNFSM4HZFN7DQ .

Abhi3daxe commented 5 years ago

Hi Guys,

I resolved my issue. The issue is solved when I used PyQt5 version 5.11.3 Not sure what the difference is and also we need tensorflow version 2.0.0

Thanks for sharing this amazing tool Corentin.

projoy commented 5 years ago

@CorentinJ By the way, what's the total GPU memory this code consume? I currently run on a 4gb GPU but CUDA out of memory?

put short sentences and it will not to out of memory. I just have 1gb GPU, I use "hello world" to run, that's ok

Abhi3daxe commented 5 years ago

Hi,

I have a 16 gb gpu and long sentences like around 4 lines work flawlessly. I dont think it uses all the space though.

Thanks.

On Fri., Sep. 13, 2019, 21:57 projoy, notifications@github.com wrote:

@CorentinJ https://github.com/CorentinJ By the way, what's the total GPU memory this code consume? I currently run on a 4gb GPU but CUDA out of memory?

put short sentences and it will not to out of memory. I just have 1gb GPU, I use "hello world" to run, that's ok

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CorentinJ/Real-Time-Voice-Cloning/issues/11?email_source=notifications&email_token=ANC53LU6WA7WKGVW2F6ZMOLQJRAKLA5CNFSM4HZFN7D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6WRMPI#issuecomment-531437117, or mute the thread https://github.com/notifications/unsubscribe-auth/ANC53LVO25CIZ3ELT5SZRZ3QJRAKLANCNFSM4HZFN7DQ .

andylida commented 5 years ago

tensorflow 2.0 works for me! thanks for suggestion!@Abhi3daxe

golfsierra1 commented 5 years ago

What am I doing wrong here?

Zachs-MacBook-Pro:Real-Time-Voice-Cloning zachhightower$ python3 demo_cli.py Traceback (most recent call last): File "demo_cli.py", line 3, in from synthesizer.inference import Synthesizer File "/Users/zachhightower/Desktop/Real-Time-Voice-Cloning/synthesizer/inference.py", line 1, in from synthesizer.tacotron2 import Tacotron2 File "/Users/zachhightower/Desktop/Real-Time-Voice-Cloning/synthesizer/tacotron2.py", line 3, in from synthesizer.models import create_model File "/Users/zachhightower/Desktop/Real-Time-Voice-Cloning/synthesizer/models/init.py", line 1, in from .tacotron import Tacotron File "/Users/zachhightower/Desktop/Real-Time-Voice-Cloning/synthesizer/models/tacotron.py", line 4, in from synthesizer.models.helpers import TacoTrainingHelper, TacoTestHelper File "/Users/zachhightower/Desktop/Real-Time-Voice-Cloning/synthesizer/models/helpers.py", line 3, in from tensorflow.contrib.seq2seq import Helper ModuleNotFoundError: No module named 'tensorflow.contrib' Zachs-MacBook-Pro:Real-Time-Voice-Cloning zachhightower$

golfsierra1 commented 5 years ago

Ive installed tensorflow several times, removing it each time

golfsierra1 commented 5 years ago

While running toolbox_cli.py, I get the response, No such file or directory

ngopal-27 commented 4 years ago

I am getting an error as given below when we are giving the command.

C:\Users\anand\Real-Time-Voice-Cloning>python demo_toolbox.py -d ~/Desktop/LibriSpeech/train-clean-100/ Traceback (most recent call last): File "demo_toolbox.py", line 2, in from toolbox import Toolbox File "C:\Users\anand\Real-Time-Voice-Cloning\toolbox__init__.py", line 1, in from toolbox.ui import UI File "C:\Users\anand\Real-Time-Voice-Cloning\toolbox\ui.py", line 1, in from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas File "C:\Users\anand\AppData\Local\Programs\Python\Python38-32\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 11, in from .backend_qt5 import ( File "C:\Users\anand\AppData\Local\Programs\Python\Python38-32\lib\site-packages\matplotlib\backends\backend_qt5.py", line 15, in import matplotlib.backends.qt_editor.figureoptions as figureoptions File "C:\Users\anand\AppData\Local\Programs\Python\Python38-32\lib\site-packages\matplotlib\backends\qt_editor\figureoptions.py", line 12, in from matplotlib.backends.qt_compat import QtGui File "C:\Users\anand\AppData\Local\Programs\Python\Python38-32\lib\site-packages\matplotlib\backends\qt_compat.py", line 168, in raise ImportError("Failed to import any qt binding") ImportError: Failed to import any qt binding

Please help

Regards Gopal

afantasialiberal commented 4 years ago

Hello, i am trying to make it work but i get this message, i am doing something wrong here?

python3.7 demo_toolbox.py -d dataset_root/vocoder/saved_models/pretrained/ Arguments: datasets_root: dataset_root/vocoder/saved_models/pretrained enc_models_dir: encoder/saved_models syn_models_dir: synthesizer/saved_models voc_models_dir: vocoder/saved_models low_mem: False seed: None

Error: Model files not found. If needed, download them here: https://github.com/CorentinJ/Real-Time-Voice-Cloning/wiki/Pretrained-models

ghost commented 4 years ago

@afantasialiberal You should be putting the pretrained models in the following locations so the toolbox can find them:

Encoder: Real-Time-Voice-Cloning/encoder/saved_models/pretrained.pt Synthesizer: Real-Time-Voice-Cloning/synthesizer/saved_models/logs-pretrained/* (there will be a few files) Vocoder: Real-Time-Voice-Cloning/vocoder/saved_models/pretrained/pretrained.pt

Then run the toolbox with:

python3.7 demo_toolbox.py
afantasialiberal commented 4 years ago

Thanks it was not clear for me, now it work.

jaccqo commented 4 years ago

im getting the following error when i hit synthesize and vocode ,"Could not find any synthesizer weights under C:\Users\jack\PycharmProjects\pythonProject\Real-Time-Voice-Cloning\synthesizer\saved_models\logs-pretrained\taco_pretrained\checkpoint\taco_pretrained",someone help please

Josseca commented 3 years ago

Intercambio

sudhanvaar commented 2 years ago

Hello sir, i have installed every dependencies but while i run th audio i get an error which says Numpy not available .... what can i do to resolve it ???

mikemills254 commented 2 years ago

Hello I have an error Voice-cloe

Ivancorreia commented 1 year ago

Olá estou com um erro Cloe de voz

Capturar Olá estou enfrentando o mesmo proplema seu também

prasanthvempadapu commented 1 year ago

when I try to record the audio I got an exception as

Traceback (most recent call last): File "F:\GenAi\Real-Time-Voice-Cloning\toolbox__init__.py", line 163, in record wav = self.ui.record_one(encoder.sampling_rate, 5) File "F:\GenAi\Real-Time-Voice-Cloning\toolbox\ui.py", line 224, in record_one self.set_loading(i, duration) File "F:\GenAi\Real-Time-Voice-Cloning\toolbox\ui.py", line 384, in set_loading self.loading_bar.setValue(value * 100) TypeError: setValue(self, value: int): argument 1 has unexpected type 'numpy.float64'

bantikumarsatlokashram commented 1 year ago

Preparing the encoder, the synthesizer and the vocoder... Loaded encoder "encoder.pt" trained to step 1564501 Synthesizer using device: cuda Building Wave-RNN Trainable Parameters: 4.481M Loading model weights at saved_models\default\vocoder.pt Testing your configuration with small inputs. Testing the encoder... Traceback (most recent call last): File "C:\voice\demo_cli.py", line 83, in embedding = encoder.embed_utterance(audio_waveform) File "C:\voice\encoder\inference.py", line 144, in embed_utterance frames = audio.wav_to_mel_spectrogram(wav) File "C:\voice\encoder\audio.py", line 58, in wav_to_mel_spectrogram frames = librosa.feature.melspectrogram( TypeError: melspectrogram() takes 0 positional arguments but 2 positional arguments (and 2 keyword-only arguments) were given

Soul0702 commented 1 year ago

Hey @DrStoop I was trying to launch the app but it kept giving me this

Screenshot (107)~2

AttributeError: module 'numpy' has no attribute 'float'. np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

DrStoop commented 1 year ago

Hi @Soul0702, when you read the error messages closely it's telling you that somewhere in your scripts there is a "np.float" explicitly used which is depreciated and it also advises you what to replace it with. I would recommend to try to replace "np.float" with "np.float64" first (not "float") as this repo is based on numpy (a.f.a.I.c.r.). Probably you'll find the "np.float" in "C:\User\PC\Desktop\voice\toolbox\ui.py", if not check the other files listed. General advice, openAI's ChatGPT is often a good adviser for coding errors and how-to-questions as long as they don't go too much into depth. Good luck!

OmairAhmad1998 commented 1 year ago

Hello guyz. I am facing the issue when i try to import audio file (TypeError: can't convert np.ndarray of type numpy.object_. The only supported types are: float64, float32, float16, complex64, complex128, int64, int32, int16, int8, uint8, and bool. ) please someone help me , it's really important

andresgomesz commented 12 months ago

Hi Guys!

@OmairAhmad1998 if you are using most resent numpy version, you need to edit the code "numpy.int32" to int only, same for "numpy.float32", to dtype=float.

Also, I need help, I have an error when I trying to load an dataset using the toolbox interface, when I click on "load" I am getting this error, img attached, "Exception: load() takes 1 positional argument but 2 were given"

I have not idea why, I do not modify the code. Do you have any ideas?

error

eyesofish commented 11 months ago

Hello ,I run this on windows 10. image what does this mean exactly?

eyesofish commented 11 months ago

i just push the load buttton.

eyesofish commented 11 months ago

image

sjos226 commented 11 months ago

Aborted (core dumped) I am getting this error

SyedMuqtasidAli commented 7 months ago

I have completed all steps, just before running this command - python demo_toolbox.py i am not getting Ui window also my CMD do not showing any error just this is show: kindly anyone resolve this issue: @DrStoop @projoy @freecui @CorentinJ @andresgomesz WhatsApp Image 2024-03-12 at 12 55 08_ad8b91c4 WhatsApp Image 2024-03-12 at 12 55 08_ad8b91c4

jarar21 commented 7 months ago

Olá estou com um erro Cloe de voz

Capturar Olá estou enfrentando o mesmo proplema seu também

I did this and it worked for me Update this line in In encoder/inference.py :

    sampling_rate = 441  # Example sampling rate
    frames = audio.wav_to_mel_spectrogram(wav, sampling_rate)

And replace this code witht the existing code in encoder/audio.py

   def wav_to_mel_spectrogram(wav, sampling_rate):
    frames = librosa.feature.melspectrogram(
    y=wav,
    sr=sampling_rate,
    n_fft=int(sampling_rate * mel_window_length / 1000),
    hop_length=int(sampling_rate * mel_window_step / 1000),
    n_mels=mel_n_channels
)
    return frames.astype(np.float32).T
jarar21 commented 7 months ago

Hey @DrStoop I was trying to launch the app but it kept giving me this

Screenshot (107)~2

AttributeError: module 'numpy' has no attribute 'float'. np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

use float instead of np.float