amsehili / auditok

An audio/acoustic activity detection and audio segmentation tool
MIT License
749 stars 96 forks source link

Failed when using split_and_plot #38

Closed jiawei-zhang-a closed 3 years ago

jiawei-zhang-a commented 3 years ago

if min_dur <= 0: TypeError: '<=' not supported between instances of 'ellipsis' and 'int'

amsehili commented 3 years ago

Hello, could you please share the code that gave you this error? Thanks.

jiawei-zhang-a commented 3 years ago

Of course Sir! I tried python3.6 and python3.8, both of them do not work I also tried pip install auditok and pip install git+..... Both versions do not work

import auditok region = auditok.load("humming_vocals.wav") # returns an AudioRegion object regions = region.split_and_plot(...) # or just region.splitp()

amsehili commented 3 years ago

Please share the full error message with line numbers so that I can figure out where the error originates from. Also it'd be very helpful if you can share an audio file that I can use to reproduce the error.

jiawei-zhang-a commented 3 years ago

Sure sir! i am currently out of Office,and i will reply to you before Monday noon

jiawei-zhang-a commented 3 years ago

(split_env) C:\Users\v_gejwzhang\ASR>python split_and_plot.py Traceback (most recent call last): File "split_and_plot.py", line 4, in regions = region.split_and_plot(...) # or just region.splitp() File "C:\ProgramData\Anaconda3\envs\split_env\lib\site-packages\auditok\core.py", line 881, in split_and_plot kwargs File "C:\ProgramData\Anaconda3\envs\split_env\lib\site-packages\auditok\core.py", line 807, in split kwargs File "C:\ProgramData\Anaconda3\envs\split_env\lib\site-packages\auditok\core.py", line 199, in split if min_dur <= 0: TypeError: '<=' not supported between instances of 'ellipsis' and 'int' `import auditok region = auditok.load("humming_vocal.wav") # returns an AudioRegion object

regions = region.split_and_plot(...) # or just region.splitp()`

jiawei-zhang-a commented 3 years ago

https://github.com/jiaweioi/Auditok-Split_and_plot I have left the audio humming.wav in this link

amsehili commented 3 years ago

Hi, Just call the function without the 'ellipsis' (the ...) and it should work. The ... in the example means you should place the function parameters here.

 regions = region.split_and_plot()
jiawei-zhang-a commented 3 years ago

Oh my bad! I did not notice that. Thank you so much! It works now!