Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error while running "split_audio_on_tone.py" #5

Closed
otamabon1015 opened this issue Oct 28, 2020 · 2 comments
Closed

Getting error while running "split_audio_on_tone.py" #5

otamabon1015 opened this issue Oct 28, 2020 · 2 comments

Comments

@otamabon1015
Copy link

otamabon1015 commented Oct 28, 2020

Wenn I try to run the script "examples/split_audio_on_tone.py" with the wav-data attached in the folder "files" I get this error:

Traceback (most recent call last):
  File "/Users/tamaki/Desktop/pyAcoustics/examples/split_audio_on_tone.py", line 72, in <module>
    audiosplitOnTone(_dataPath, _fn, _pitchPath, _tgPath, _wavOutputPath,
  File "/Users/tamaki/Desktop/pyAcoustics/examples/split_audio_on_tone.py", line 52, in audiosplitOnTone
    split_on_tone.extractSubwavs(timeDict, inputPath, fn, subwavPath)
  File "/Users/tamaki/miniconda3/envs/Praktikum/lib/python3.9/site-packages/pyacoustics/speech_detection/split_on_tone.py", line 83, in extractSubwavs
    audio_scripts.extractSubwav(join(path, fn),
  File "/Users/tamaki/miniconda3/envs/Praktikum/lib/python3.9/site-packages/pyacoustics/signals/audio_scripts.py", line 231, in extractSubwav
    audioFrames = getSubwav(fn, startT, endT, singleChannelFlag)
  File "/Users/tamaki/miniconda3/envs/Praktikum/lib/python3.9/site-packages/pyacoustics/signals/audio_scripts.py", line 210, in getSubwav
    audiofile.setpos(int(framerate * startT))
  File "/Users/tamaki/miniconda3/envs/Praktikum/lib/python3.9/wave.py", line 229, in setpos
    raise Error('position not in range')
wave.Error: position not in range

What am I doing wrong?
I am on macOS Catalina 10.15.7 and using python 3.9.0. I also tried it with other versions and It didn't work.
Thank you in advance for your answer.

@timmahrt
Copy link
Owner

Hi,
There was a bug in the code. I've pushed a new release v1.0.4. If you try again it should work with the test cases provided.

@otamabon1015
Copy link
Author

Thank you for your quick response. It seems to work well now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants