StarGAN-Voice-Conversion icon indicating copy to clipboard operation
StarGAN-Voice-Conversion copied to clipboard

I cannot run the code.

Open Husnain08 opened this issue 4 years ago • 24 comments

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 avatar Aug 08 '19 09:08 Husnain08

How can I resolve the issue?

Husnain08 avatar Aug 08 '19 09:08 Husnain08

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

liusongxiang avatar Aug 12 '19 07:08 liusongxiang

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

Husnain08 avatar Aug 16 '19 07:08 Husnain08

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

ZhanPoChen avatar Aug 20 '19 09:08 ZhanPoChen

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

Husnain08 avatar Aug 20 '19 09:08 Husnain08

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

LinAurora avatar Aug 24 '19 11:08 LinAurora

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

Husnain08 avatar Aug 24 '19 12:08 Husnain08

@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 avatar Aug 24 '19 13:08 LinAurora

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

LinAurora avatar Aug 24 '19 14:08 LinAurora

@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 avatar Aug 24 '19 16:08 Husnain08

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.

Husnain08 avatar Aug 24 '19 16:08 Husnain08

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.

raanubis avatar Sep 18 '19 05:09 raanubis

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

smalissa avatar Oct 29 '19 17:10 smalissa

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

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

repo-wiseacre avatar Nov 18 '19 12:11 repo-wiseacre

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

smalissa avatar Nov 18 '19 19:11 smalissa

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

cyl123789 avatar Jan 10 '20 03:01 cyl123789

@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!

shazhongcheng avatar May 16 '20 03:05 shazhongcheng

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

swoboo avatar Sep 17 '20 18:09 swoboo

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

atravler avatar Dec 02 '20 14:12 atravler

@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?

atravler avatar Dec 03 '20 03:12 atravler

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

hongchengzhu avatar Apr 13 '21 08:04 hongchengzhu

@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 avatar Apr 13 '21 08:04 hongchengzhu

@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 avatar Apr 13 '21 09:04 hongchengzhu

@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?

hongchengzhu avatar Apr 13 '21 09:04 hongchengzhu