lowerquality / gentle

gentle forced aligner
https://lowerquality.com/gentle/
MIT License
1.41k stars 294 forks source link

Kaldi build will silently fail on Cygwin #180

Open mflux opened 6 years ago

mflux commented 6 years ago

Kaldi on Cygwin can't build against shared and must build against static. The correct configure command should be:

./configure --static --static-fst

As it is, gentle will not build Kaldi correctly while the install.sh continues. Perhaps some kind of environment detection or alternative install.sh could be made to address this?

babon commented 5 years ago

Hey, I've just SUCCESSFULLY built gentle using Windows with Cygwin,

after like 10 hours of trial and error. https://i.imgur.com/fN0DYAC.jpg

Dont know where to put this so i'm just gonna describe my process here:

1) Download and install Cygwin - https://www.cygwin.com/ 2) When choosing packages, select these: https://i.imgur.com/ctaN1ly.png PLUS "python27", "python36", "python2-twisted", "python3-twisted", maybe some others i forgot. 3) Open cygwin console, "git clone https://github.com/lowerquality/gentle.git" 4) Run "bash install.sh", let it download kaldi, wait for it to fail, or just close it before it finishes. (Wait until it downloads kaldi/tools/Makefile) 5) In "kaldi/tools/Makefile", line 87, replace "http://openfst.cs.nyu.edu" with "http://openfst.org" 6) run "cd kaldi/tools/", then run "./configure --shared", then run "make depend -j 8", then run "make -j 8" 7) In "/gentle/resample.py" change line 37 outfile to 'temp.wav', line 46 fp.name to 'temp.wav' 8) Download ffmpeg.exe from https://ffmpeg.zeranoe.com/builds/ and place it next to install.sh in root 9) Now you should be able to run "bash install.sh" and it should complete sucessfully (with a couple hundred warnings everywhere) (if it fails, try running it more than once)

If kaldi is compiled all fine, but when you try to run serve.py or align.py with all the parameters it gives you some trouble about missing models, download and extract https://lowerquality.com/gentle/kaldi-models-0.03.zip, https://lowerquality.com/gentle/aspire-hclg.tar.gz into root

If you want to use align.py with empty text files, so it generates the text for you too, you can replace in align.py line 54 gentle.ForcedAligner(..) with gentle.FullTranscriber(resources, nthreads=args.nthreads)

strob commented 5 years ago

Thank you so much for the documentation! I’m sure this will be a great resource for future Windows users.

On Mar 22, 2019, at 10:11 PM, Dmitry notifications@github.com wrote:

Hey, I've just SUCCESSFULLY built gentle using Windows with Cygwin,

after like 10 hours of trial and error. https://i.imgur.com/fN0DYAC.jpg https://i.imgur.com/fN0DYAC.jpg Dont know where to put this so i'm just gonna describe my process here:

Download and install Cygwin - https://www.cygwin.com/ https://www.cygwin.com/ When choosing packages, select these: https://i.imgur.com/ctaN1ly.png https://i.imgur.com/ctaN1ly.png PLUS "python27", "python36", "twisted" Open cygwin console, "git clone https://github.com/lowerquality/gentle.git https://github.com/lowerquality/gentle.git" Run "bash install.sh", let it download kaldi, wait for it to fail, or just close it before it finishes. (Wait until it downloads kaldi/tools/Makefile) In "kaldi/tools/Makefile", line 87, replace "http://openfst.cs.nyu.edu/t http://openfst.cs.nyu.edu/t.." with "http://openfst.org/t http://openfst.org/t.." "cd kaldi/tools/", then run "./configure --shared", then run "make depend -j 8", then run "make -j 8" In "/gentle/resample.py" change line 37 outfile to 'temp.wav', line 46 fp.name to 'temp.wav' Download ffmpeg.exe from https://ffmpeg.zeranoe.com/builds/ https://ffmpeg.zeranoe.com/builds/ and place it next to install.sh in root Now you should be able to run "bash install.sh" and it should complete sucessfully (with a couple hundred warnings everywhere) (if it fails, try running it more than once) If you want to use align.py with empty text files, so it generates the text for you too, you can replace in align.py line 54 gentle.ForcedAligner(..) with gentle.FullTranscriber(resources, nthreads=args.nthreads)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lowerquality/gentle/issues/180#issuecomment-475840283, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMup0iqTToNQPBro2irUTLVqwtq_iUsks5vZbebgaJpZM4UnId4.