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

Can't save the silence clip #13

Open
Tschipp opened this issue Oct 9, 2020 · 0 comments
Open

Can't save the silence clip #13

Tschipp opened this issue Oct 9, 2020 · 0 comments

Comments

@Tschipp
Copy link

Tschipp commented Oct 9, 2020

When I try to save the silence using the --save-silence argument, I get this error:

Finding gaps...
Traceback (most recent call last):
  File "video-remove-silence", line 138, in <module>
    silences, including_end = find_silences(audio_file.name)
  File "video-remove-silence", line 118, in find_silences
    frames = wav.readframes(end - start)
  File "C:\Users\USER\AppData\Local\Programs\Python\Python38\lib\wave.py", line 243, in readframes
    data = self._data_chunk.read(nframes * self._framesize)
  File "C:\Users\USER\AppData\Local\Programs\Python\Python38\lib\chunk.py", line 136, in read
    data = self.file.read(size)
  File "C:\Users\USER\AppData\Local\Programs\Python\Python38\lib\chunk.py", line 136, in read
    data = self.file.read(size)
TypeError: argument should be integer or None, not 'float'

I went and took a look and it seems that this is where it fails:
frames = wav.readframes(end - start), because end - start is a float. I tried casting it to an int but that didn't work for some reason.

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

1 participant