Articulatory Phonetics
- phonlab.egg_to_oq(x, fs, hop_dur=0.005, f0_range=[60, 400], hp_cut=70, hp_order=8, threshold=0.43)[source]
Get glottal open quotient from electroglottography data
Extract fundamental frequency of voice (f0) and glottal open quotient (OQ) at equally spaced intervals in a recording of electroglottography (a stereo file). OQ is calcuated with the ‘hybrid’ method (Herbst, 2020). Preprocessing filtering method follows Rothenberg (2002).
- Parameters:
x (ndarray) – A one-dimensional array of samples in an electroglottograph waveform
fs (int) – the sampling rate of x
hop_dur (float, default = 0.005) – interval in seconds between frames (0.005 seconds = 5 milliseconds)
f0_range (list of two integers, default = [63,400]) – The lowest and highest allowed values of f0.
hp_cut (int, default = 70) – highpass filter cut frequency (in Hz) (Rothenberg, 2002)
hp_order (int, default = 8) – highpass filter order (Rothenberg, 2002)
threshold (float, default = 0.43) – threshold between 0 and 1, on the EGG signal for glottal opening instant (Herbst, 2020)
- Returns:
df – Open quotient and f0 results in a Pandas dataframe.
- Return type:
DataFrame
Note
The returned Pandas dataframe has columns:
sec - midpoint times (seconds) of the analysis frames in f0 and OQ
OQ - the glottal open quotient as a function of time.
f0 - estimates of the fundamental frequency of voicing as a function of time
References
Herbst (2020) Electroglottography − An Update. Journal of Voice , 34 (4), pp. 503-526.
Rothenberg (2002) Correcting low-frequency phase distortion in electroglottograph waveforms. Journal of Voice , 16 (1), 32-36.
Example
file = "F1_bha24_1.wav" # a stereo file with audio in channel 0 and egg in 1 egg,audio,fs = phon.loadsig(file, chansel=[1,0]) # fool with `chansel` oqdf = phon.egg2oq(egg,fs) # return open quotient data
See the example ipython notebook for the code used to generate this figure
Calculate Open Quotient and f0 from ElectroGlottoGraphic data