From caddebadcc45d1636448f138f254702c410626c1 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Mon, 21 Mar 2022 01:13:19 -0400 Subject: [PATCH] [-] Remove window length limit --- src/spectral_tilt.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/spectral_tilt.py b/src/spectral_tilt.py index c939cef..8118350 100644 --- a/src/spectral_tilt.py +++ b/src/spectral_tilt.py @@ -6,10 +6,11 @@ from parselmouth.praat import call # https://github.com/Voice-Lab/VoiceLab/blob/2edf9678866eb5f5f230bf1578e1aa418f7f4917/Voicelab/toolkits/Voicelab/MeasureSpectralTiltNode.py # The closer to positive the creakier it is# -def tilt(sound): +def tilt(sound: parselmouth.Sound): # read the sound - window_length_in_millisecs = 64 - window_length = window_length_in_millisecs / 1000 + + window_length = sound.get_total_duration() + # Compute begin and end times, set window end = call(sound, "Get end time") @@ -66,8 +67,3 @@ def tilt(sound): spectral_tilt = sXY / sXX # print(spectral_tilt) return spectral_tilt -# tilt("../creaky i.wav") -# tilt("../normal i.wav") - -# tilt("../Creaky.wav") -# tilt("../Breathy.wav")