liusongxiang / StarGAN-Voice-Conversion

This is a pytorch implementation of the paper: StarGAN-VC: Non-parallel many-to-many voice conversion with star generative adversarial networks
https://arxiv.org/abs/1806.02169
513 stars 93 forks source link

I cannot run the code. #10

Open Husnain08 opened 5 years ago

Husnain08 commented 5 years ago

When I run the command python preprocess.py --sample_rate 16000 --origin_wavpath data/VCTK-Corpus/wav48 --target_wavpath data/VCTK-Corpus/wav16 --mc_dir_train data/mc/train --mc_dir_test data/mc/test

I get the following error Traceback (most recent call last): File "C:\Users\user pc\Anaconda3\lib\concurrent\futures\process.py", line 232, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) File "C:\Users\user pc\PycharmProjects\song\preprocess.py", line 25, in resample subprocess.call(['sox', wav_from, "-r", "16000", wav_to]) File "C:\Users\user pc\Anaconda3\lib\subprocess.py", line 323, in call with Popen(*popenargs, **kwargs) as p: File "C:\Users\user pc\Anaconda3\lib\subprocess.py", line 775, in __init__ restore_signals, start_new_session) File "C:\Users\user pc\Anaconda3\lib\subprocess.py", line 1178, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified

Husnain08 commented 5 years ago

How can I resolve the issue?

liusongxiang commented 5 years ago

I haven't test under Windows. You can refer to this: https://github.com/robertjoosten/video2mocap/issues/1

Husnain08 commented 5 years ago

The solution did not help. I don't have the problem of python3.exe. When I run the preprocess file, it says that it cannot find the wav file which is present in the said directory

ZhanPoChen commented 5 years ago

It's need sox package. Maybe, you can try ffmpeg.

Husnain08 commented 5 years ago

@ZhanPoChen yes. It took me one week to this out by myself. I installed the sox package and voila, the model was perfectly running

LinAurora commented 5 years ago

@Husnain08 hello,I meet the same problem ,could u tell me how to solve it?

Husnain08 commented 5 years ago

Sure. @LinAurora Can you tell me a little bit more about what issues are you facing? Add a screenshot of your problem if possible

LinAurora commented 5 years ago

@Husnain08 The first problem I encountered was that couldn't find the wav file. I downloaded the Linux subsystem and modified the subprocess.py file. Then could find the file, but there was a scramble in the running process, and the final output was all 0. In addition, there was a valueError later. I had spent a lot of time to solve these problems. But it hasn't been solved yet. I hope you can help me.

LinAurora commented 5 years ago

B{K8X{N)H1BYHD4)_}79IEU @Husnain08

Husnain08 commented 5 years ago

@LinAurora I also encountered this problem. Please download the "sox" package for Linux. It solved this issue for me. Please refer to this https://ubuntuforums.org/showthread.php?t=1577560 And let me know if you have any problem.

Husnain08 commented 5 years ago

The preprocess.py file has an issue in it. It uses Regular expressions. And you will find that in the preprocess.py, there will be 2 lines that say "re.match". Just change those lines to "re.search" and it will eliminate the problem that the system cannot find the files.

raanubis commented 5 years ago

for windows users: On windows install sox (latest is 14.4.2) from https://sourceforge.net/projects/sox/ set a path in your systemenvironment to variable path ; add C:\Program Files (x86)\sox-14-4-2 for more informations, see "Edit the system environment variables" -> https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10 you should call sox in every command box now.

to prevent - clipping and decrease volume warnings - change in line 25 of preprocss.py from subprocess.call(['sox', wav_from, "-r", "16000", wav_to]) to subprocess.call(['sox', wav_from, "-r", "16000", "-D", "--norm", wav_to])

Options used: -r 16000 is to set the sample rate -D to prevent Dithering --norm (normalize) prevents clipping and "decrease volume?" warnings

for more options call sox in a cmd box, it shows his options.

smalissa commented 4 years ago

@Husnain08 hello,I meet the same problem ,could u tell me how to solve it?

repo-wiseacre commented 4 years ago

I am also having the same problem for the below code.

import espeak es = espeak.ESpeak(voice='bn') es.say(text)

smalissa commented 4 years ago

repo-wiseacre just installed the sox package and voila, the model was perfectly running

cyl123789 commented 4 years ago

Who has downloaded a good language library, I can not download down

shazhongcheng commented 4 years ago

@ZhanPoChen yes. It took me one week to this out by myself. I installed the sox package and voila, the model was perfectly running

and restart pycharm!

swoboo commented 4 years ago

HI how I convert wavs which didn't trained but from same sourcespeaker?

atravler commented 3 years ago

i also can't run this code,with following problem。whether if i install sox could figure it out? image

atravler commented 3 years ago

@LinAurora I also encountered this problem. Please download the "sox" package for Linux. It solved this issue for me. Please refer to this https://ubuntuforums.org/showthread.php?t=1577560 And let me know if you have any problem.

image i use ubuntu,and have installed sox ,this problem appeared。could you tell how to fix it?

hongchengzhu commented 3 years ago

image In windows 10, I have installed the latest sox but still have this question. So how to solve it? Thank you.

hongchengzhu commented 3 years ago

@LinAurora I also encountered this problem. Please download the "sox" package for Linux. It solved this issue for me. Please refer to this https://ubuntuforums.org/showthread.php?t=1577560 And let me know if you have any problem.

I have downloaded sox in my ubuntu, but still says "ValueError..." like this. image

hongchengzhu commented 3 years ago

@LinAurora I also encountered this problem. Please download the "sox" package for Linux. It solved this issue for me. Please refer to this https://ubuntuforums.org/showthread.php?t=1577560 And let me know if you have any problem.

image Sorry, I have installed sox and voila, but still this error. I really don't know how to solve it. Could you give me some advice? Thank you!

hongchengzhu commented 3 years ago

@LinAurora I also encountered this problem. Please download the "sox" package for Linux. It solved this issue for me. Please refer to this https://ubuntuforums.org/showthread.php?t=1577560 And let me know if you have any problem.

image i use ubuntu,and have installed sox ,this problem appeared。could you tell how to fix it?

have you solved your problem?