merlin icon indicating copy to clipboard operation
merlin copied to clipboard

Speech Tools wrongly named as .tar.gz

Open pravn opened this issue 5 years ago • 3 comments

It should be .tar. See my logs ''' (base) pytorch@deepDSP01:~/projects/interspeech2019/tmp$ ls speech_tools-2.4-release.tar.gz (base) pytorch@deepDSP01:~/projects/interspeech2019/tmp$ tar -xvzf speech_tools-2.4-release.tar.gz

gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now

(base) pytorch@deepDSP01:~/projects/interspeech2019/tmp$ tar -xvf speech_tools-2.4-release.tar.gz speech_tools/Makefile speech_tools/README ...'''

pravn avatar Mar 12 '19 21:03 pravn

This only happens if we download speech_tools as mentioned in the voice conversion wiki page under "Dependency Tools". https://github.com/CSTR-Edinburgh/merlin/tree/master/egs/voice_conversion/s1

I was able to get around this by using the install scripts in merlin/tools

pravn avatar Mar 12 '19 22:03 pravn

The installation for speech tools in egg/voice_conversion and merlin/tools are the same, is the error definitely inconsistent between the two?

Both are downloading the same file http://www.cstr.ed.ac.uk/downloads/festival/2.4/speech_tools-2.4-release.tar.gz

ZackHodari avatar Apr 15 '19 09:04 ZackHodari

I've also run into this issue. The reason is the downloaded file is not in gzip format, as the error message states. Thus, tar xzf speech_tools-2.4-release.tar.gz generates the error. However, tar zf speech_tools-2.4-release.tar.gz doesn't.

A possible solution would be check if the file is compressed or not before using tar command. Define a function to reuse in all bash scripts:

function expand_file(){
    filename="$1"
    gzip -t $filename &> /dev/null
    if [[ $? -eq 0]]; then
        tar zxf $filename
    else
        echo "$filename  not in zip format"
        tar xf $filename
   fi
}

Then call it like this:

expand_file speech_tools-2.4-release.tar.gz

jmetzz avatar Sep 19 '19 12:09 jmetzz