Snippets

Firoj Alam what can be done with sox

Created by Firoj Alam last modified
How to splits wav using sox?
The syntax to extract a part of an audio file to the output file is: 
sox file.wav output.wav trim [start time in seconds] [duration in seconds]  
For example, the command below will copy paste a part of an audio file that starts in second #90 and last for 2 minutes: 
sox input.wav output.wav trim 90 120 

http://www.linuxandlife.com/2013/03/how-to-use-sox-audio-editing.html
How to remove silence using sox?

http://digitalcardboard.com/blog/2009/08/25/the-sox-of-silence/
Segmenting
sox 1375094369_121513_1_pcm_ch2.wav 1375094369_121513_1_pcm_ch2_Fru_00001.wav --show-progress trim 119.66 124.31

## Segmenting followed by silence shortening ignoring pops and clicks
sox 1358406941_33062_2_pcm_ch1.wav 1358406941_33062_2_pcm_ch1_Emp_0.wav --show-progress trim 119.66 124.31 silence -l 1 0.3 1% -1 1.0 1% reverse silence 1 0.1 1% reverse

sox 1374255934_2933507_2_pcm_ch1.wav out.wav silence -l 1 0.1 -40d -1 1.0 -40d reverse silence 1 0.1 -40d reverse


::: Audacity:::::
Controls:
Sound/Silence threshold (dB): The detection threshold below which audio is considered "silent" and above which "sound".
Min detected silence (seconds): Silences shorter than this are ignored.
Min detected sound (seconds): Sounds shorter than this are ignored.
What to label: Choice - Sounds / Silences.
Can label either sounds or silences.
Where to label: Choice - Before Start / Middle / After End / Region.
Can produce point labels:
before the start of the detected region,
in the middle of the detected region,
after the end of the detected region.
or can label the region (region label).
Before Start max offset (s): If a label is placed before the start of a sound/silence, this sets the maximum time (seconds) before the start. Detected regions are not allowed to overlap and the first label cannot be before the start of the selection.
After End max offset (s): If a label is placed after the end of a sound/silence, this sets the maximum time (seconds) after the end. Detected regions are not allowed to overlap.
Label text (optional): If not empty, each label will have this label text.
Number from (optional): If not empty, each label will start with a number, counting up from this number. Leading zeros are honoured



:::: praat ::::
http://www.fon.hum.uva.nl/praat/manual/Intensity__To_TextGrid__silences____.html

Algorithm

First the intensity contour is evaluated and the intervals above and below the silence threshold are marked as sounding and silent. We then remove sounding intervals with a duration smaller than the Minimum sounding interval duration. This step is followed by joining the neighbouring silent intervals that resulted because of this removal. Finally we remove silent intervals with a duration smaller than the Minimum silent interval duration. This is followed by joining the neighbouring sounding intervals that resulted because of this removal.

Experience showed that first removing short intensity bursts instead of short silences gave better results than doing it the other way around.


Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.