asteroid-team / asteroid

The PyTorch-based audio source separation toolkit for researchers
https://asteroid-team.github.io/
MIT License
2.21k stars 419 forks source link

why can't I run the ./run.sh ? #661

Closed lucyanddarlin closed 1 year ago

lucyanddarlin commented 1 year ago

Whether I execute on Mac or Windows ./run.sh will get the following errors. Could someone tell me how to run it correctly? Thank you very much!!!

$ ./run.sh Stage 0: Converting sphere files to wav files Download sph2pipe_v2.5 into egs/tools --2023-04-01 14:46:46-- http://www.openslr.org/resources/3/sph2pipe_v2.5.tar.gz Resolving www.openslr.org (www.openslr.org)... 46.101.158.64 Connecting to www.openslr.org (www.openslr.org)|46.101.158.64|:80... connected. HTTP request sent, awaiting response... 302 Found Location: https://openslr.magicdatatech.com/resources/3/sph2pipe_v2.5.tar.gz [following] --2023-04-01 14:46:47-- https://openslr.magicdatatech.com/resources/3/sph2pipe_v2.5.tar.gz Resolving openslr.magicdatatech.com (openslr.magicdatatech.com)... 39.96.249.211 Connecting to openslr.magicdatatech.com (openslr.magicdatatech.com)|39.96.249.211|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 329832 (322K) [application/x-gzip] Saving to: '../../tools/sph2pipe_v2.5.tar.gz'

 0K .......... .......... .......... .......... .......... 15% 33.2K 8s
50K .......... .......... .......... .......... .......... 31%  284K 4s

100K .......... .......... .......... .......... .......... 46% 554K 2s 150K .......... .......... .......... .......... .......... 62% 653K 1s 200K .......... .......... .......... .......... .......... 77% 1.09M 1s 250K .......... .......... .......... .......... .......... 93% 199K 0s 300K .......... .......... .. 100% 497K=2.2s

2023-04-01 14:46:50 (147 KB/s) - '../../tools/sph2pipe_v2.5.tar.gz' saved [329832/329832]

sph2pipe_v2.5 sph2pipe_v2.5/0readme.1st sph2pipe_v2.5/bitshift.h sph2pipe_v2.5/file_headers.c sph2pipe_v2.5/shorten_x.c sph2pipe_v2.5/sph2pipe.c sph2pipe_v2.5/sph_convert.h sph2pipe_v2.5/test sph2pipe_v2.5/test/123_1pcbe_shn.sph sph2pipe_v2.5/test/123_1pcle_shn.sph sph2pipe_v2.5/test/123_1ulaw_shn.sph sph2pipe_v2.5/test/123_2alaw.sph sph2pipe_v2.5/test/123_2pcbe_shn.sph sph2pipe_v2.5/test/123_2pcle_shn.sph sph2pipe_v2.5/test/123_2ulaw_shn.sph sph2pipe_v2.5/test/big1.hdr sph2pipe_v2.5/test/big2.hdr sph2pipe_v2.5/test/outfile-md5.list.macosx sph2pipe_v2.5/test/std1.hdr sph2pipe_v2.5/test/std2.hdr sph2pipe_v2.5/test/test_all.pl sph2pipe_v2.5/ulaw.h sph2pipe_v2.5/sph2pipe.exe sph2pipe_v2.5/file_headers.c:579:1: warning: return type defaults to 'int' [-Wimplicit-int] 579 | ConvertToIeeeExtended(num, bytes) | ^~~~~ sph2pipe_v2.5/shorten_x.c: In function 'fwrite_type': sph2pipe_v2.5/shorten_x.c:325:36: warning: implicit declaration of function 'pcm2alaw' [-Wimplicit-function-declaration] 325 | writebufp++ = pcm2alaw( ulaw2pcm[data0[i]] ); | ^~~~ sph2pipe_v2.5/shorten_x.c:381:38: warning: implicit declaration of function 'pcm2ulaw' [-Wimplicit-function-declaration] 381 | writebufp++ = pcm2ulaw( data0[i] ); | ^~~~ sph2pipe_v2.5/sph2pipe.c: In function 'getUserOpts': sph2pipe_v2.5/sph2pipe.c:191:18: warning: implicit declaration of function 'getopt' [-Wimplicit-function-declaration] 191 | while (( i = getopt( ac, av, "daupf:c:t:s:h:" )) != EOF ) | ^~ sph2pipe_v2.5/sph2pipe.c:229:25: warning: implicit declaration of function 'index' [-Wimplicit-function-declaration] 229 | if (( cln = index( optarg, ':' )) == NULL ) { | ^~~~~ sph2pipe_v2.5/sph2pipe.c:229:25: warning: incompatible implicit declaration of built-in function 'index' [-Wbuiltin-declaration-mismatch] sph2pipe_v2.5/sph2pipe.c:254:25: warning: incompatible implicit declaration of built-in function 'index' [-Wbuiltin-declaration-mismatch] 254 | if (( cln = index( optarg, ':' )) == NULL ) { | ^~~~~ C:/soft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\lucy\AppData\Local\Temp\ccwL9dY7.o:sph2pipe.c:(.text+0x48c): undefined reference to index' C:/soft/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\lucy\AppData\Local\Temp\ccwL9dY7.o:sph2pipe.c:(.text+0x63f): undefined reference toindex' collect2.exe: error: ld returned 1 exit status Convert sphere format to wav format Could not find (or execute) the sph2pipe program at ../../tools/sph2pipe_v2.5/sph2pipe

lucyanddarlin commented 1 year ago

errors on mac:

❯ ./run.sh Stage 0: Converting sphere files to wav files Download sph2pipe_v2.5 into egs/tools --2023-03-31 21:28:26-- http://www.openslr.org/resources/3/sph2pipe_v2.5.tar.gz 正在解析主机 www.openslr.org (www.openslr.org)... 46.101.158.64 正在连接 www.openslr.org (www.openslr.org)|46.101.158.64|:80... 已连接。 已发出 HTTP 请求,正在等待回应... 302 Found 位置:https://openslr.magicdatatech.com/resources/3/sph2pipe_v2.5.tar.gz [跟随至新的 URL] --2023-03-31 21:28:27-- https://openslr.magicdatatech.com/resources/3/sph2pipe_v2.5.tar.gz 正在解析主机 openslr.magicdatatech.com (openslr.magicdatatech.com)... 39.96.249.211 正在连接 openslr.magicdatatech.com (openslr.magicdatatech.com)|39.96.249.211|:443... 已连接。 已发出 HTTP 请求,正在等待回应... 200 OK 长度:329832 (322K) [application/x-gzip] 正在保存至: “../../tools/sph2pipe_v2.5.tar.gz.1”

sph2pipe_v2.5.tar.gz.1 100%[================================================================================================================================>] 322.10K 39.6KB/s 用时 8.1s

2023-03-31 21:28:36 (39.6 KB/s) - 已保存 “../../tools/sph2pipe_v2.5.tar.gz.1” [329832/329832])

x sph2pipe_v2.5 x sph2pipe_v2.5/0readme.1st x sph2pipe_v2.5/bitshift.h x sph2pipe_v2.5/file_headers.c x sph2pipe_v2.5/shorten_x.c x sph2pipe_v2.5/sph2pipe.c x sph2pipe_v2.5/sph_convert.h x sph2pipe_v2.5/test x sph2pipe_v2.5/test/123_1pcbe_shn.sph x sph2pipe_v2.5/test/123_1pcle_shn.sph x sph2pipe_v2.5/test/123_1ulaw_shn.sph x sph2pipe_v2.5/test/123_2alaw.sph x sph2pipe_v2.5/test/123_2pcbe_shn.sph x sph2pipe_v2.5/test/123_2pcle_shn.sph x sph2pipe_v2.5/test/123_2ulaw_shn.sph x sph2pipe_v2.5/test/big1.hdr x sph2pipe_v2.5/test/big2.hdr x sph2pipe_v2.5/test/outfile-md5.list.macosx x sph2pipe_v2.5/test/std1.hdr x sph2pipe_v2.5/test/std2.hdr x sph2pipe_v2.5/test/test_all.pl x sph2pipe_v2.5/ulaw.h x sph2pipe_v2.5/sph2pipe.exe sph2pipe_v2.5/file_headers.c:149:24: warning: format specifies type 'int' but the argument has type 'off_t' (aka 'long long') [-Wformat] inpname, sampcount, statbuf.st_size ); ^~~~~~~ sph2pipe_v2.5/file_headers.c:579:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] ConvertToIeeeExtended(num, bytes) ^ sph2pipe_v2.5/file_headers.c:579:1: warning: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype] sph2pipe_v2.5/file_headers.c:629:1: warning: non-void function does not return a value [-Wreturn-type] } ^ 4 warnings generated. sph2pipe_v2.5/shorten_x.c:187:29: warning: too many arguments in call to 'word_get' gbuffer = word_get(fpin);


sph2pipe_v2.5/shorten_x.c:187:24: warning: passing arguments to 'word_get' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
            gbuffer = word_get(fpin);
                              ^
sph2pipe_v2.5/shorten_x.c:325:22: error: call to undeclared function 'pcm2alaw'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                    *writebufp++ = pcm2alaw( ulaw2pcm[data0[i]] );
                                   ^
sph2pipe_v2.5/shorten_x.c:381:24: error: call to undeclared function 'pcm2ulaw'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                      *writebufp++ = pcm2ulaw( data0[i] );
                                     ^
sph2pipe_v2.5/shorten_x.c:393:24: error: call to undeclared function 'pcm2alaw'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                      *writebufp++ = pcm2alaw( data0[i] );
                                     ^
sph2pipe_v2.5/shorten_x.c:435:20: error: call to undeclared function 'pcm2ulaw'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                  *writebufp++ = pcm2ulaw(data0[i] << 3);
                                 ^
2 warnings and 4 errors generated.
sph2pipe_v2.5/sph2pipe.c:191:18: error: call to undeclared function 'getopt'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    while (( i = getopt( ac, av, "daupf:c:t:s:h:" )) != EOF )
                 ^
sph2pipe_v2.5/sph2pipe.c:530:11: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
            cptr = inpbuf;
                 ^ ~~~~~~
sph2pipe_v2.5/sph2pipe.c:545:8: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
                cptr = inpbuf;
                     ^ ~~~~~~
sph2pipe_v2.5/sph2pipe.c:547:15: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
                wptr = cptr = outbuf;
                            ^ ~~~~~~
sph2pipe_v2.5/sph2pipe.c:547:8: warning: assigning to 'char *' from 'unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
                wptr = cptr = outbuf;
                     ^ ~~~~~~~~~~~~~
sph2pipe_v2.5/sph2pipe.c:561:11: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
            cptr = inpbuf;
                 ^ ~~~~~~
sph2pipe_v2.5/sph2pipe.c:568:11: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
            cptr = inpbuf;
                 ^ ~~~~~~
sph2pipe_v2.5/sph2pipe.c:616:7: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
        cptr = inpbuf;
             ^ ~~~~~~
7 warnings and 1 error generated.
Convert sphere format to wav format
Could not find (or execute) the sph2pipe program at ../../tools/sph2pipe_v2.5/sph2pipe
lucyanddarlin commented 1 year ago

conda list: ❯ conda list

packages in environment at /opt/homebrew/Caskroom/miniforge/base/envs/asteroid:

#

Name Version Build Channel

aiohttp 3.8.4 pypi_0 pypi aiosignal 1.3.1 pypi_0 pypi appdirs 1.4.4 pypi_0 pypi asteroid 0.6.1.dev0 dev_0 asteroid-filterbanks 0.4.0 pypi_0 pypi async-timeout 4.0.2 pypi_0 pypi attrs 22.2.0 pypi_0 pypi audioread 3.0.0 pypi_0 pypi ca-certificates 2022.4.26 hca03da5_0 anaconda cached-property 1.5.2 pypi_0 pypi certifi 2022.6.15 py38hca03da5_0 anaconda cffi 1.15.1 pypi_0 pypi charset-normalizer 3.1.0 pypi_0 pypi cython 0.29.28 py38hc377ac9_0 anaconda decorator 5.1.1 pypi_0 pypi einops 0.6.0 pypi_0 pypi filelock 3.10.7 pypi_0 pypi frozenlist 1.3.3 pypi_0 pypi fsspec 2023.3.0 pypi_0 pypi future 0.18.3 pypi_0 pypi huggingface-hub 0.13.3 pypi_0 pypi idna 3.4 pypi_0 pypi importlib-metadata 6.1.0 pypi_0 pypi jinja2 3.1.2 pypi_0 pypi joblib 1.2.0 pypi_0 pypi julius 0.2.7 pypi_0 pypi lazy-loader 0.2 pypi_0 pypi libcxx 12.0.0 hf6beb65_1 anaconda libffi 3.4.2 hc377ac9_4 anaconda librosa 0.10.0.post2 pypi_0 pypi lightning-utilities 0.8.0 pypi_0 pypi llvmlite 0.39.1 pypi_0 pypi markupsafe 2.1.2 pypi_0 pypi mir-eval 0.7 pypi_0 pypi mpmath 1.3.0 pypi_0 pypi msgpack 1.0.5 pypi_0 pypi multidict 6.0.4 pypi_0 pypi ncurses 6.3 h1a28f6b_2 anaconda networkx 3.0 pypi_0 pypi numba 0.56.4 pypi_0 pypi numpy 1.23.5 pypi_0 pypi openssl 1.1.1o h1a28f6b_0 anaconda packaging 23.0 pypi_0 pypi pandas 1.5.3 pypi_0 pypi pb-bss-eval 0.0.2 pypi_0 pypi pesq 0.0.4 pypi_0 pypi pip 21.2.4 py38hca03da5_0 anaconda pooch 1.6.0 pypi_0 pypi pycparser 2.21 pypi_0 pypi pystoi 0.3.3 pypi_0 pypi python 3.8.13 hbdb9e5c_0 anaconda python-dateutil 2.8.2 pypi_0 pypi pytorch-lightning 2.0.1 pypi_0 pypi pytorch-ranger 0.1.1 pypi_0 pypi pytz 2023.3 pypi_0 pypi pyyaml 6.0 pypi_0 pypi readline 8.1.2 h1a28f6b_1 anaconda requests 2.28.2 pypi_0 pypi scikit-learn 1.2.2 pypi_0 pypi scipy 1.10.1 pypi_0 pypi setuptools 61.2.0 py38hca03da5_0 anaconda six 1.16.0 pypi_0 pypi soundfile 0.12.1 pypi_0 pypi soxr 0.3.4 pypi_0 pypi sqlite 3.38.5 h1058600_0 anaconda sympy 1.11.1 pypi_0 pypi threadpoolctl 3.1.0 pypi_0 pypi tk 8.6.12 hb8d0fd4_0 anaconda torch 2.0.0 pypi_0 pypi torch-optimizer 0.1.0 pypi_0 pypi torch-stoi 0.1.2 pypi_0 pypi torchaudio 2.0.1 pypi_0 pypi torchmetrics 0.11.4 pypi_0 pypi tqdm 4.65.0 pypi_0 pypi typing-extensions 4.5.0 pypi_0 pypi urllib3 1.26.15 pypi_0 pypi wheel 0.37.1 pyhd3eb1b0_0 anaconda xz 5.2.5 h1a28f6b_1 anaconda yarl 1.8.2 pypi_0 pypi zipp 3.15.0 pypi_0 pypi zlib 1.2.12 h5a0b063_2 anaconda

mpariente commented 1 year ago

Which fix did you try ?

lucyanddarlin commented 1 year ago

i updated gcc and g++.

lucyanddarlin commented 1 year ago

but it dont wrok..

mpariente commented 1 year ago

Looks like an installation problem of sph2pipe. Did you have a look for similar error in the kaldi repo?

Le sam. 1 avr. 2023 à 10:46, lucyanddarlin @.***> a écrit :

but it dont wrok..

— Reply to this email directly, view it on GitHub https://github.com/asteroid-team/asteroid/issues/661#issuecomment-1492880868, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEND2HDTEMUN5FFMSDR53GDW67TQBANCNFSM6AAAAAAWPOKGAU . You are receiving this because you commented.Message ID: @.***>

lucyanddarlin commented 1 year ago

fail in the kaldi repo : (... Is the reason that I'm using m1 mac? Can't they run in the m1 mac?

lucyanddarlin commented 1 year ago

Hi! I successfully run the exp 'yesno' in kaldi. But I fail to run the ./run.sh in asteroid : (... I got the follow errors:

sph2pipe_v2.5/file_headers.c:149:24: warning: format specifies type 'int' but the argument has type 'off_t' (aka 'long long') [-Wformat]
                        inpname, sampcount, statbuf.st_size );
                                            ^~~~~~~~~~~~~~~
sph2pipe_v2.5/file_headers.c:579:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
ConvertToIeeeExtended(num, bytes)
^
sph2pipe_v2.5/file_headers.c:579:1: warning: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
sph2pipe_v2.5/file_headers.c:629:1: warning: non-void function does not return a value [-Wreturn-type]
}
^
4 warnings generated.
sph2pipe_v2.5/shorten_x.c:187:29: warning: too many arguments in call to 'word_get'
            gbuffer = word_get(fpin);
                      ~~~~~~~~     ^
sph2pipe_v2.5/shorten_x.c:187:24: warning: passing arguments to 'word_get' without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
            gbuffer = word_get(fpin);
                              ^
sph2pipe_v2.5/shorten_x.c:325:22: error: call to undeclared function 'pcm2alaw'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                    *writebufp++ = pcm2alaw( ulaw2pcm[data0[i]] );
                                   ^
sph2pipe_v2.5/shorten_x.c:381:24: error: call to undeclared function 'pcm2ulaw'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                      *writebufp++ = pcm2ulaw( data0[i] );
                                     ^
sph2pipe_v2.5/shorten_x.c:393:24: error: call to undeclared function 'pcm2alaw'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                      *writebufp++ = pcm2alaw( data0[i] );
                                     ^
sph2pipe_v2.5/shorten_x.c:435:20: error: call to undeclared function 'pcm2ulaw'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                  *writebufp++ = pcm2ulaw(data0[i] << 3);
                                 ^
2 warnings and 4 errors generated.
sph2pipe_v2.5/sph2pipe.c:191:18: error: call to undeclared function 'getopt'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    while (( i = getopt( ac, av, "daupf:c:t:s:h:" )) != EOF )
                 ^
sph2pipe_v2.5/sph2pipe.c:530:11: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
            cptr = inpbuf;
                 ^ ~~~~~~
sph2pipe_v2.5/sph2pipe.c:545:8: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
                cptr = inpbuf;
                     ^ ~~~~~~
sph2pipe_v2.5/sph2pipe.c:547:15: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
                wptr = cptr = outbuf;
                            ^ ~~~~~~
sph2pipe_v2.5/sph2pipe.c:547:8: warning: assigning to 'char *' from 'unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
                wptr = cptr = outbuf;
                     ^ ~~~~~~~~~~~~~
sph2pipe_v2.5/sph2pipe.c:561:11: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
            cptr = inpbuf;
                 ^ ~~~~~~
sph2pipe_v2.5/sph2pipe.c:568:11: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
            cptr = inpbuf;
                 ^ ~~~~~~
sph2pipe_v2.5/sph2pipe.c:616:7: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
        cptr = inpbuf;
             ^ ~~~~~~
7 warnings and 1 error generated.
Convert sphere format to wav format
Could not find (or execute) the sph2pipe program at ../../tools/sph2pipe_v2.5/sph2pipe
lucyanddarlin commented 1 year ago

here is my gcc version:

❯ gcc -v                  
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
lucyanddarlin commented 1 year ago

could you compile 'sph2pipe' then send the file to the email: lucykfc1@gmail.com, thank you so much!!!

lucyanddarlin commented 1 year ago

when I run /asteroid-master/egs/avspeech/looking-to-listen/run.sh, I get the follow errors:

get_attribute:5: command not found: grep
get_attribute:5: command not found: awk
get_attribute:5: command not found: sed

but I have installed them :

❯ whereis grep
grep: /usr/bin/grep /usr/share/man/man1/grep.1
juntong20XX commented 1 year ago

Hi, I also meet this error in MINGW on win10. Did you fix it?

juntong20XX commented 1 year ago

Hi, I also meet this error in MINGW on win10. Did you fix it?

Emm, I fix the problem by change sph2pipe=../../tools/sph2pipe_v2.5/sph2pipe to sph2pipe=../../tools/sph2pipe_v2.5/sph2pipe.exe and commented out gcc part. So I can run the file on zsh by msys2.

SAKi-77 commented 1 year ago

Hi, I also meet this error in MINGW on win10. Did you fix it?

Emm, I fix the problem by change sph2pipe=../../tools/sph2pipe_v2.5/sph2pipe to sph2pipe=../../tools/sph2pipe_v2.5/sph2pipe.exe and commented out gcc part. So I can run the file on zsh by msys2.

This method is useful!