Debian Codegraph @

dwtest/test_Sound_voiceActivity.praat

raw
1 # test_Sound_voiceActivity.praat
2 # djmw 20210317
3 # ppgb 20240104 typo
4
5 random_initializeWithSeedUnsafelyButPredictably (0.5)
6 noise = Create Sound from formula: "noise", 1, 0, 1, 44100, ~ randomGauss(0,1)
7 random_initializeSafelyAndUnpredictably ()
8 textgrid = nowarn To TextGrid (voice activity): 0.0, 0.3, 0.1, 70, 6000, -10, -35, 0.1, 0.1, "silent", "sounding"
9 numberOfIntervals = Get number of intervals: 1
10 assert numberOfIntervals = 1
11 label$ = Get label of interval: 1, 1
12 assert label$ = "silent"
13
14 sound = Read from file: "Example_vorbis_audio.ogg"
15 textgrid2 = To TextGrid (voice activity): 0.0, 0.3, 0.1, 70, 6000, -10, -35, 0.1, 0.1, "silent", "sounding"
16 numberOfIntervals = Get number of intervals: 1
17 assert numberOfIntervals = 1
18 label$ = Get label of interval: 1, 1
19 assert label$ = "sounding"
20
21 selectObject: sound
22 spectrogram = To Spectrogram: 0.02, 6000, 0.01, 20, "Hanning (sine-squared)"
23 matrix = Get long-term spectral flatness: 0.3, 0.1, 70, 6000
24
25
26 removeObject: noise, textgrid, matrix, spectrogram, sound, textgrid2
27