Skip to content

Instantly share code, notes, and snippets.

@Rast1234
Created February 21, 2014 03:47
Show Gist options
  • Select an option

  • Save Rast1234/9128398 to your computer and use it in GitHub Desktop.

Select an option

Save Rast1234/9128398 to your computer and use it in GitHub Desktop.
# Open file, generate voice and silence parts index, save
Read from file: "c:\Videolectures\a.mp3"
# set parameters for intensity analysis
min_pitch = 100 ; (Hz)
time_step = 0.0 ; (sec) 0 is auto
# set parameters for silent intervals detaction
silence_threshold = -27.0 ; (dB)
min_silent_interval = 0.5 ; (sec)
min_sound_interval = 0.1 ; (sec)
silent_label$ = "--" ; labels for result
sound_label$ = "++"
# do actual work
snd = selected("Sound")
selectObject: snd
To TextGrid (silences): min_pitch, time_step, silence_threshold,
... min_silent_interval, min_sound_interval, silent_label$, sound_label$
# cleanup
select all
Remove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment