Skip to content

Add seek step to enable faster silence detection#211

Merged
jiaaro merged 2 commits intojiaaro:masterfrom
marciomazza:seek_step_for_detect_silence
Aug 29, 2017
Merged

Add seek step to enable faster silence detection#211
jiaaro merged 2 commits intojiaaro:masterfrom
marciomazza:seek_step_for_detect_silence

Conversation

@marciomazza
Copy link
Contributor

@marciomazza marciomazza commented Aug 21, 2017

Silence detection can be very slow on large files.
One way of speeding it up is to seek for silence chunks at steps, instead of trying every single millisecond as a chunk start.

This pull adds such a seek step to the detection, as a parameter at the end of the involved functions, with a default value of one. That makes it backwards compatible.

One possible future improvement would be to parallelize the detection.

universal = 1

[pep8]
max-line-length = 100
Copy link
Contributor Author

@marciomazza marciomazza Aug 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the max columns used now in the project is 99, by running this at the project root:

find -name '*.py' | xargs cat | awk '{print length}' | sort | tail -n 1

This config makes autopep8 respect that maximum line length.

@marciomazza marciomazza force-pushed the seek_step_for_detect_silence branch from 6e89589 to 2a48cba Compare August 21, 2017 17:52
@jiaaro jiaaro merged commit 5950ece into jiaaro:master Aug 29, 2017
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

Successfully merging this pull request may close these issues.

2 participants