# HG changeset patch # User Amine Sehili # Date 1442913131 -7200 # Node ID 31c97510b16b560b0b2fc0f0c692e899f6489a29 # Parent 364eeb8e8bd21f1edc4e491ddcd260bd6b009c70 README.md, demos/audio_trim_demo.py updated diff -r 364eeb8e8bd2 -r 31c97510b16b README.md --- a/README.md Tue Sep 22 10:49:57 2015 +0200 +++ b/README.md Tue Sep 22 11:12:11 2015 +0200 @@ -1,7 +1,7 @@ AUDIo TOKenizer =============== -`auditok` is an Audio Activity Detection library that wan be used with online data (i.e. microphone) or with audio files. +`auditok` is an **Audio Activity Detection** library that can be used with online data (i.e. microphone) or with audio files. Requirements ------------ @@ -10,7 +10,7 @@ Installation ------------ - pip install auditok + python setup.py install Demos ----- @@ -22,7 +22,15 @@ python demos/echo.py 50 15 - If only one argument is given it will be used for energy. Other demos are in /demos. + If only one argument is given it will be used for energy. + +Try out this demo with an audio file (no argument is required): + + python demos/audio_tokenize_demo.py + +Finally, this in this demo `auditok` is used to remove tailing and leading silence from an audio file: + + python demos/audio_trim_demo.py Documentation ------------- @@ -40,4 +48,3 @@ Author ------ Amine Sehili () - diff -r 364eeb8e8bd2 -r 31c97510b16b demos/audio_trim_demo.py --- a/demos/audio_trim_demo.py Tue Sep 22 10:49:57 2015 +0200 +++ b/demos/audio_trim_demo.py Tue Sep 22 11:12:11 2015 +0200 @@ -67,9 +67,9 @@ validator = AudioEnergyValidator(sample_width=asource.get_sample_width(), energy_threshold=50) # Create a tokenizer with an unlimited token length and continuous silence within a token -# Note the DROP_TRAILING_SILENCE mode that will ensure removing tailing silence +# Note the DROP_TAILING_SILENCE mode that will ensure removing tailing silence trimmer = StreamTokenizer(validator, min_length = 20, max_length=99999999, - max_continuous_silence=9999999, mode=StreamTokenizer.DROP_TRAILING_SILENCE, init_min=3, init_max_silence=1) + max_continuous_silence=9999999, mode=StreamTokenizer.DROP_TAILING_SILENCE, init_min=3, init_max_silence=1) tokens = trimmer.tokenize(asource)