Debian Codegraph @

LPC/manual_LPC.cpp

raw
1 /* manual_LPC.cpp
2 *
3 * Copyright (C) 1994-2025 David Weenink
4 *
5 * This code is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
9 *
10 * This code is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this work. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 /*
20 djmw 20020422 GPL + removed "C syntax" part of manpage
21 djmw 20101009 Latest modification
22 */
23
24 #include "KlattGrid.h"
25 #include "ManPagesM.h"
26 #include "MFCC.h"
27
28 void manual_LPC (ManPages me);
29 void manual_LPC (ManPages me)
30 {
31 MAN_BEGIN (U"Candidate modelling settings...", U"djmw", 20221129)
32 INTRO (U"A command in the #Candidates menu of the @FormantPathEditor window.")
33 TERM (U"##Coefficients by track#")
34 DEFINITION (U"determines how many coefficients will be used in the modelling of a formant track. "
35
36 "The second number determines the number of coefficients for the modelling of formant 2, and so on. "
37 "For example, if you specify \"4 3 3\", the first three formants will be modelled. Formant 1 will be modelled with 4 "
38 "coefficients which means that a third order polynomial is used for modelling. Formant 2 and formant 3 are modelled with "
39 "3 coefficients which means that their tracks will be modelled as parabolas.")
40 TERM (U"##Variance exponent#")
41 DEFINITION (U"determines the power of the first term in the overall stress criterion #S. "
42 "The best model is the one with the lowest value for the stress %S.")
43 NORMAL (U"The stress criterion #S is defined in @@Weenink (2015)@ as")
44 EQUATION (U"%S = (%s^2 / %k)^^%varianceExponent^ (%\\ci^^2^ / %d),")
45 NORMAL (U"where %s^^2^ is the sum of the squares of the standard errors of all the coefficients of the modelled formant "
46 "tracks within one Formant object, %k is the total number of coefficients of these tracks, in the example given above "
47 "%k is 10 (= 4 + 3 + 3), \\ci^^2^ is the sum of the chi squares of each track, %d is the sum of the "
48 "degrees of freedom of each track. "
49 "Because the standard error %s is proportional to bandwidth and \\ci^^2^ is inversely proportional to bandwidth, "
50 "the expression for %S grows approximately as 2\\.c%varianceExponent-2 with bandwidth. Setting the %varianceExponent "
51 "somewhat larger than one guarantees that for two tracks whose formants only differ in their bandwidths, the track with the "
52 "larger bandwidths obtains a larger value for the stress value %S.")
53 MAN_END
54
55 MAN_BEGIN (U"CC: Paint...", U"djmw", 20040407)
56 INTRO (U"A command to paint the cepstral coefficients in shades of grey.")
57 ENTRY (U"Settings")
58 TERM (U"##From coefficient#, ##To coefficient#")
59 DEFINITION (U"the range of coefficients that will be represented.")
60 MAN_END
61
62 MAN_BEGIN (U"CC: To DTW...", U"djmw", 20221114)
63 INTRO (U"You can choose this command after selecting two objects with cepstral coefficients (two @MFCC's or @LFCC's). "
64 "With this command you perform dynamic time warping. ")
65 ENTRY (U"Algorithm")
66 NORMAL (U"First we calculate the distance matrix %D of all the distances between the cepstral frames of the two objects. "
67 "This matrix has %n__1_ rows, the number of frames in the first object, and %n__2_ columns, the number of frames "
68 "in the second object.")
69 NORMAL (U"The elements of %D are the distances %d__%ij_ between frame %i (from the first object) and frame %j "
70 "(from the second one). The %d__%ij_ are composed of three parts:")
71 EQUATION (U"%d__%ij_ = %w__1_ \\.c %d__1_ + %w__2_ \\.c %d__2_ + %w__3_ \\.c %d__3_,")
72 NORMAL (U"where %w__1_, %w__2_ and %w__3_ are user-supplied weights and ")
73 TERM (U"%d__1_ = \\su^^N^__%k=1_ (%c__%ik_ - %c__%jk_)^2), ")
74 DEFINITION (U"the sum of the squared distances between the %N cepstral coefficients of the two frames. ")
75 TERM (U"%d__2_ = (c__%i0_ - c__%j0_)^2")
76 DEFINITION (U"the difference between the average 'power' of the two frames.")
77 TERM (U"%d__3_ = \\su^^N^__%k=1_ (%r__%ik_ - %r__%jk_)^2), ")
78 DEFINITION (U"in which %r__%ik_ is the regression coefficient of the cepstral coefficient %k, calculated "
79 "from the frames within a time span of %T seconds, the %%regression window length%, around the centre of frame %i.")
80 NORMAL (U"After calculation of all the frame distances %d__%ij_, we find the optimal path through the distance matrix %D with a "
81 "Viterbi-algorithm.")
82 MAN_END
83
84 MAN_BEGIN (U"CC: To Matrix", U"djmw", 20011123)
85 INTRO (U"Copies the cepstral coefficients of the selected @CC "
86 "object to a newly created @Matrix object.")
87 ENTRY (U"Behaviour")
88 EQUATION (U"%z__%ji_ = %c__%ij_, with 1 \\<_ %i \\<_ %nx and "
89 "1 \\<_ j \\<_ %numberOfCoefficients__%i_,")
90 NORMAL (U"where %z__%ji_ is the matrix element in row %j and column %i and "
91 "%c__%ij_ is the %j-th cepstral coefficient in frame %i.")
92 MAN_END
93
94 MAN_BEGIN (U"CPP", U"djmw", 20260814)
95 INTRO (U"One of the @@types of objects@ in Praat.")
96 NORMAL (U"A CPP object represents Cepstral Peak Prominence as a function of time.")
97 NORMAL (U"CPP shows periodicity in the Spectrum. Periodicity in the Spectrum is caused by periodicity in the sound if the sound is composed of %%multiple% harmonics. A single sine with frequency f0 does not show periodicity in the spectrum, just a single peak. Only if there are harmonics of f0, periodicity in the spectrum will turn up.")
98 MAN_END
99
100 MAN_BEGIN (U"Formant: List formant slope...", U"djmw", 20210813)
101 INTRO (U"A command available in the @@Query submenu@ if you select a @@Formant@ object. The Info window will show the characteristics of the slope of the chosen interval as a vector with a number of values.")
102 ENTRY (U"Settings")
103 TERM (U"##Formant number#,")
104 DEFINITION (U"defines the formant whose slope characteristics you want.")
105 TERM (U"##Time range (s)#,")
106 DEFINITION (U"defines the start time and the end time of the segment on which the slope should be determined.")
107 TERM (U"##Slope curve#")
108 DEFINITION (U"defines the kind of curve you want to fit on the formant points to determine the slope characteristics. "
109 "The options available are ##Exponential plus constant#, ##Parabolic# and ##Sigmoid plus constant#.")
110 ENTRY (U"The vector result")
111 NORMAL (U"The vector values are determined from the fit of the formant track with a an ##exponential plus constant# function "
112 "%F(%t) = %a+%b\\.cexp(%c\\.c%t), or a ##parabolic# function %F(%t) = %a+%b\\.ct+%c\\.ct^2, or a ##sigmoid plus constant# function "
113 "%F(%t) = %a+%b / (1 + exp(- (%t -c) / d)) "
114 "on the chosen interval [%t__min_, %t__max_].")
115 TERM (U"##1. Average slope (Hz / s)#")
116 DEFINITION (U"defined as (%F__start_ - %F__end_) / (%t__max_ - %t__min_), where %F__start_ and %F__end_ are the start and "
117 "end values of the fitted function %F(%t) and %t__max_ and %t__min_ are the start and end times of the interval.")
118 TERM (U"##2. %R^2#")
119 DEFINITION (U"The %R^2 value of the fit defined as %R^2 = 1 - %varianceAfter / %varianceBefore.")
120 TERM (U"##3. %F__start_#")
121 DEFINITION (U"the frequency in hertz of the function %F(%t__min_).")
122 TERM (U"##4. %F__end_#")
123 DEFINITION (U"the frequency in hertz of the function %F(%t__max_).")
124 TERM (U"##5. %a#")
125 DEFINITION (U"the parameter %a (hertz) of the function %F(%t).")
126 TERM (U"##6. %b#")
127 DEFINITION (U"the parameter %b of the function %F(%t).")
128 TERM (U"##7. %c#")
129 DEFINITION (U"the parameter %c ( / s) of the function %F(%t).")
130 TERM (U"##8. %d#")
131 DEFINITION (U"the parameter %d of the function %F(%t), if the sigmoid plus constant function was chosen.")
132 ENTRY (U"Remarks about the interpretation of the fit parameters.")
133 NORMAL (U"The returned average slope parameter is reliable only if the formant trajectory is clearly not constant and there is a large difference between the %F__start_ and the %F__end_ values. In cases where the formant trajectory shows a noisy pattern all return values have a large error margin and the determined average slope can also be unreliable.")
134 ENTRY (U"Algorithm")
135 NORMAL (U"The algorithm to fit the %%non-linear% exponential plus constant and the sigmoid plus constant functions to a series of (time, frequency) values by a non-iterative algorithm is described in @@Jacquelin (2009)@.")
136 MAN_END
137
138 MAN_BEGIN (U"HTK parameter file format", U"djmw", 20210311)
139 INTRO (U"HTK parameter format files consist of a contiguous sequence of frames preceded by a header. "
140 "Each frame is a vector of either 2-byte integers or 4-byte floats. 2-byte integers are used for "
141 "compressed forms and for vector quantised data. All multi-byte numbers are written as big-endian numbers.")
142 NORMAL (U"The HTK file format header is 12 bytes long and contains the following data:")
143 TERM (U"numberOfFrames (4-byte integer)")
144 DEFINITION (U"The number of analysis frames in a file")
145 TERM (U"samplePeriod (4-byte integer)")
146 DEFINITION (U"The sample period in units of 100 ns. A sampling frequency of 10 kHz would correspond to a sample period of 0.0001 s and to a value of 1000 in this field.")
147 TERM (U"frameSize (2-byte integer)")
148 DEFINITION (U"The number of bytes per frame.")
149 TERM (U"parameterKind (2-byte integer)")
150 DEFINITION (U"A code indication what kind of frames the file contains.")
151 ENTRY (U"Remarks")
152 NORMAL (U"The HTK parameter files do not contain specific information that identifies them as "
153 "HTK parameter files. However, the file type can be deduced as follows. If we have any file and interpret "
154 "the first 12 bytes as the above format specifies then we know that the first three numbers read have to "
155 "be positive integers, that frameSize has to an even number and that %numberOfFrames * %frameSize + 12 must be equal to the number "
156 "of bytes in the file. The chance that a random data file fulfils these conditions is very small.")
157 ENTRY (U"VTRFormants data in HTK parameter format")
158 NORMAL (U"The VTRFormants data of @@Deng et al. (2006)@ can serve as reference formant frequency values for "
159 "(part of) the TIMIT acoustic phonetic corpus. These data are stored in HTK parameter files with extension \".fb\". "
160 "They can be download from %%http://www.seas.ucla.edu/spapl/VTRFormants.html%.")
161 NORMAL (U"HTK parameter files do not contain timing information and therefore we can only calculate the domain of "
162 "the Formant from external information. From the ##Deng et al. (2006)# paper we assume that the data were taken "
163 "every 10 ms and therefore the best guess for the duration of the Formant equals %numberOfFrames * 0.01."
164 "The value in these files for the samplePeriod is 10000 which is a factor 10 off from the correct value of 1000 in units of 100 ns.")
165 MAN_END
166
167 MAN_BEGIN (U"FormantPath", U"djmw", 20230225)
168 INTRO (U"One of the @@types of objects@ in Praat. A ##FormantPath# object maintains a path through a collection of "
169 "Formant objects, each the result of a formant frequency analysis of the same sound but with a different setting "
170 "of the analysis parameters.")
171 NORMAL (U"A FormantPath combines a collection of @@Formant@s with a TextGrid that indicates which of these formants is preferred "
172 "in a certain time interval. ")
173 NORMAL (U"As an example we consider a FormantPath that has nine Formant objects in its collection. "
174 "Suppose these formant objects were the result of nine @@Sound: To Formant (burg)...@ analyses of the ##same# sound, "
175 "however, with a difference only in the \"Formant ceiling (Hz)\" parameter setting which was 4093.7, 4303.5, 4524.2, 4756.1, "
176 "5000.0, 5256.4, 5525.9, 5809.2, and 6107.0 Hz, respectively. "
177 "In this way, this collection of Formants functions as a set of alternative analyses where the \"Time step\", "
178 "the \"Max. number of formants\", the \"Window length\" and the \"Pre-emphasis from\" are constant for each analysis and only "
179 "the frequency interval in which the number of formants should fit varies. ")
180 NORMAL (U"You create a FormantPath from a Sound with the @@Sound: To FormantPath (burg)...@ command. The FormantPath example above could have been created from a Sound by:")
181 CODE (U"To FormantPath (burg): 0.005, 5.0, 5000.0, 0.025, 50.0, 0.05, 4")
182 NORMAL (U"The Formant object which has a ceiling of 5000 Hz, the object at the middle in the set, here corresponds to the "
183 "result of the \"standard\" analysis for a male voice where the interval from 0 to 5000 Hz is chosen and we expect, "
184 "on average, five formant to exist in this interval. ")
185 NORMAL (U"To choose your own path through the alternatives you can use Praat's @@FormantPathEditor@.")
186 MAN_END
187
188 MAN_BEGIN (U"FormantPath: Down to Table (optimal interval)...", U"djmw", 20210817)
189 INTRO (U"A command that creates a @Table with formant frequency values for the chosen interval of the selected @@FormantPath@. The values in the table are from the segment that has the lowest stress value for the fit of its formant tracks.")
190 MAN_END
191
192 MAN_BEGIN (U"FormantPath: Down to Table (stresses)...", U"djmw", 20230235)
193 INTRO (U"A command that creates a @Table with stress of fit values for the selected @@FormantPath@.")
194 NORMAL (U"The resulting Table has one row for each of the ceiling frequencies. The number of columns will depend on the number of "
195 "formant tracks that are modelled. ")
196 MAN_END
197
198 MAN_BEGIN (U"Sound: To FormantPath (burg)...", U"djmw", 20230225)
199 INTRO (U"A command that creates a @@FormantPath@ object from each selected @@Sound@ . ")
200 ENTRY (U"##Settings")
201 NORMAL (U"The settings for ##Time step (s)#, ##Maximum number of formants#, ##Window length (s)# and ##Pre-emphasis from (Hz)# "
202 "are as you would set them with the @@Sound: To Formant (burg)...@ method. "
203 "The defaults are 0.005 seconds, 5.0 formants, 0.025 seconds, and 50.0 Hz, respectively.")
204 TERM (U"##Middle formant ceiling (Hz)")
205 DEFINITION (U"determines the middle formant ceiling frequency in Hz. You normaly would use 5500.0 Hz for an average female voice "
206 "and 5000.0 Hz for an average male voice as you would do for the ##Formant ceiling (Hz)# setting in ##To Formant (burg)...#. "
207 "However, instead of performing only one analysis with a fixed ceiling, we perform "
208 "multiple analyses, each with a different ceiling frequency. The number of analyses with a %%lower% formant ceiling than the "
209 "%%middle formant ceiling% is equal to the number of analyses with a %%higher% formant ceiling than the %%middle formant ceiling%. ")
210 TERM (U"##Ceiling step size#")
211 DEFINITION (U"defines the increase or decrease in the formant ceiling between two successive analyses as exp(%ceilingStepSize) "
212 "when we step up, or as exp(-%ceilingStepSize) when we step down.")
213 TERM (U"##Number of steps up / down")
214 DEFINITION (U"determines the number of steps we go up as well as the number of steps we go down with respect to the %middle formant ceiling%. "
215 "The ceiling frequency for the %i^^th^ step down is %middleFormantCeiling\\.cexp (-%i\\.c%ceilingStepSize) and for the %i^^th^ step up "
216 "is %middleFormantCeiling\\.cexp (+%i\\.c%ceilingStepSize). The total number of analyses is always 2\\.c%numberOfStepsUpDown+1.")
217 ENTRY (U"Algorithm")
218 NORMAL (U"The following algorithm describes what is going on. ")
219 CODE (U"ceiling [numberOfStepsUpDown + 1] = middleCeiling")
220 CODE (U"for istep from 1 to 2 * numberOfStepsUpDown + 1")
221 CODE1 (U"if istep <= numberOfStepsUpDown")
222 CODE2 (U"ceiling [istep] = middleFormantCeiling * exp (-(numberOfStepsUpDown - istep + 1) * ceilingStepSize)")
223 CODE1 (U"elsif istep > numberOfStepsUpOrDown + 1")
224 CODE2 (U"ceiling [istep] = middleFormantCeiling * exp ((istep - numberOfStepsUpDown - 1) * ceilingStepSize)")
225 CODE1 (U"selectObject: sound")
226 CODE1 (U"formant [istep] = To Formant (burg): timeStep, maxNumberOfFormants, ceiling [istep], windowLength, preEmphasis")
227 CODE (U"endfor")
228 NORMAL (U"This description is approximate because in the \"To Formant\" step we have to guarantee that all the Formant objects get the same time sampling.")
229 MAN_END
230
231 MAN_BEGIN (U"FormantPathEditor", U"djmw", 20220816)
232 INTRO (U"One of the @@Editors@ in Praat, for editing a @@FormantPath@ object.")
233 NORMAL (U"You can optionally include a @Sound and a @TextGrid in this editor, by selecting both the Sound and the FormantPath together, or the Sound and the TextGrid and the FormantPath together before clicking ##View & Edit#.")
234 NORMAL (U"With the FormantPathEditor you can, for each interval that you select, "
235 "replace its formant frequencies and bandwidths by the corresponding values "
236 "from one of the alternative Formant objects in the FormantPath's collection.")
237 ENTRY (U"Editor layout")
238 NORMAL (U"The left part of the editor is similar to the layout of the @@SoundEditor@.")
239 NORMAL (U"The right part is called the %%selection viewer%. "
240 "Here you see alternative formant frequency analyses of the selected part of the sound laid out in a grid "
241 "(or of the whole visible sound window if there is no selection).")
242 NORMAL (U"The selection viewer shows not only a formant's frequency but also its bandwidth as a vertical line. "
243 "This will give you a better impression of the analysis results because well defined formants have small bandwidths "
244 "and, therefore, show short vertical lines.")
245 ENTRY (U"How to operate")
246 NORMAL (U"When you start to edit a new FormantPath object, the formants in the path are set equal to the formants of the default "
247 "analysis. This guarantees that there always is a path at the start. The ceiling of this path is indicated by the fat red "
248 "line in the upper part of the spectrogram. "
249 "If you click in one of the rectangles in the selection viewer the values of the formant frequencies (and bandwidths) "
250 "in the selected part on the left are replaced by the values present in the rectangle and the fat red line will indicate "
251 "the new ceiling. The colour of the clicked rectangle on the right will also change.")
252 NORMAL (U"This also works the other way around: if you click near a red line in the spectrogram the corresponding selection viewer "
253 "will be shown.")
254 ENTRY (U"Details")
255 NORMAL (U"The stress numbers that are displayed above the rectangles in the selection viewer "
256 "are explained in @@Weenink (2015)@. Basically each number is a combined stress score of the individual formant tracks "
257 "within the rectangle. Each track's stress score quantifies how well the track has been modelled. "
258 "The lower this number is, the better the track is modelled by a polynomial of the chosen order. "
259 "The higher the order, the more flexible the curve is and the better it can adapt to the data. "
260 "The higher the order of the polynomial, the more parameters are needed in the model. "
261 "You may change the number of parameters that model each track with the ##Candidate modelling settings...# option in the Candidates menu.")
262 MAN_END
263
264 MAN_BEGIN (U"Formants: Extract smoothest part...", U"djmw", 20140313)
265 INTRO (U"Extracts the part from one of the selected formants which shows the smoothest formant tracks in a given interval. ")
266 ENTRY (U"Settings")
267 SCRIPT (5, Manual_SETTINGS_WINDOW_HEIGHT (5), U""
268 Manual_DRAW_SETTINGS_WINDOW (U"Formants: Extract smoothest part", 5)
269 Manual_DRAW_SETTINGS_WINDOW_RANGE (U"Time range (s)", U"0.0", U"0.0")
270 Manual_DRAW_SETTINGS_WINDOW_RANGE (U"Fitter formant range", U"1", U"3")
271 Manual_DRAW_SETTINGS_WINDOW_FIELD (U"Order of polynomials", U"3")
272 Manual_DRAW_SETTINGS_WINDOW_BOOLEAN (U"Use bandwidths to model formant tracks", 1)
273 Manual_DRAW_SETTINGS_WINDOW_BOOLEAN (U"Bandwidths for stress test", 0)
274 )
275 TERM (U"##Time range (s)#")
276 DEFINITION (U"determines the position of the intervals that have to be compared.")
277 TERM (U"##Fitter formant range")
278 DEFINITION (U"determines which formant tracks will be modelled with a polynomial function. The goodness of fit of these models "
279 "will be used in the comparison.")
280 TERM (U"##Order of polynomials")
281 DEFINITION (U"determines the maximum order of the polynomials that are used in modelling each formant track. Order 0 means a "
282 "model which is a constant function; this model needs only one parameter. Order 1 means a model that is a straight line "
283 "function; this order needs two parameters. Order 2 means that an additional parabolic function is used in the modelling; "
284 "order 2 needs therefore 3 parameters. In general an order %p model needs %p+1 parameters.")
285 TERM (U"##Use bandwidths to model formant tracks")
286 DEFINITION (U"Bandwidths give an indication about the sharpness of a spectral peak. Sharp peaks have small bandwidths and, "
287 "vice versa, broad peaks have large bandwidths. The width of a peak can also be interpreted as a measure of certainty "
288 "for its formant frequency value. Setting this option %%on%, the default setting, means that you force the modelling "
289 "function to be closer to frequencies that are well defined, i.e. that have sharp peaks, than to the frequencies of "
290 "broad peaks, if choices have to be made. The consequence is that in the model sharp peaks will be better represented than broad peaks.")
291 TERM (U"##Bandwidths for stress test")
292 DEFINITION (U"determines whether for the stress determination the formant frequencies are still needed. Not using them anymore "
293 "probably gives a better indication of the stress of a track.")
294 MAN_END
295
296 #define PowerCepstrum_manual_pitchRange \
297 U"determine the limits of the quefrency range where a peak is searched for. The lower quefrency is determined as " \
298 "1 / %%pitchCeiling% and this value is in general more critical than " \
299 "the value of the upper quefrency which equals 1 / %%pitchFloor%. A %%pitchCeiling% of 300 Hz will correspond to a " \
300 "lower quefrency of 1/300\\~~0.0033 seconds."
301
302 #define PowerCepstrum_manual_trendRange \
303 U"the quefrency range for which the amplitudes (in dB) will be modelled by a straight line. " \
304 "In @@Hillenbrand et al. (1994)@, the lower value for this range was chosen as 0.001 s " \
305 "in order to reduce the effect of very low quefrency data on the straight line fit. In our analysis this value " \
306 "is not so critical if we use the robust fitting procedure. If you choose the \"Least squares\" fit method " \
307 "then it matters more."
308
309 #define PowerCepstrum_manual_trendType \
310 U"defines how to model the cepstrum background. We can model it with a straight line as was " \
311 "done in @@Hillenbrand et al. (1994)@. The slope of this line will generally be negative " \
312 "because the background amplitudes get weaker for higher quefrencies. Or, we could use an exponential " \
313 "model in which the background cepstral amplitudes decay in a non-linear fashion. "
314
315 #define PowerCepstrum_manual_fitMethod \
316 U"defines how the line that models the cepstrum background is calculated. The default method, " \
317 "\"Robust slow\", corresponds to @@theil regression|Theil's robust line fit@. The \"Robust\" method corresponds to the incomplete theil regression and is computationally faster but somewhat less precise. To be compatible with the past, a standard least squares " \
318 "line fit can also be chosen but it is much less precise than the other two because a least squares fit is much more influenced by the peak cepstral values than the other two."
319
320 #define PowerCepstrum_manual_quefrencyAveragingWindow \
321 U"determines the width of the averaging window in the quefrency domain. " \
322 "By chosing a value of zero, you can prevent any smoothing in the quefrency dimension."
323
324 #define PowerCepstrogram_manual_timeAveraging \
325 U"determines the width of the averaging window in the time domain. The result " \
326 "of the smoothing will be that in the new smoothed PowerCepstrogram each cepstral value is the average of the cepstral values " \
327 "within the averaging window that was positioned symmetrically around the center of this frame in the selected PowerCepstrogram. " \
328 "By choosing a value of zero, you can prevent any smoothing in the time dimension. "
329
330 MAN_BEGIN (U"PowerCepstrogram", U"djmw", 20190909)
331 INTRO (U"One of the @@types of objects@ in Praat. A cepstrogram represents a time-quefrency representation of a sound. "
332 "Horizontally it shows time, vertically it shows quefrency while the quefrency power density is shown as shades of grey.")
333 MAN_END
334
335 MAN_BEGIN (U"PowerCepstrogram: Get CPPS...", U"djmw", 20220721)
336 INTRO (U"A command to get the cepstral peak prominence (CPP) of the selected @@PowerCepstrogram@. ")
337 NORMAL (U"The returned value is the average of the cepstral peak prominences of the individual frames.")
338 ENTRY (U"Settings")
339 TERM (U"##Subtract trend before smoothing#")
340 DEFINITION (U"determines whether the smoothing should be performed on the Cepstrogram after the trend of each PowerCepstrum frame has been removed. Because, in general, the trends in the analysis frames will not be equal, the value of CPPS will be different whether or not smoothing is performed. If no smoothing is going on the result should be independent of this setting. ")
341 TERM (U"##Time averaging window (s)#")
342 DEFINITION (PowerCepstrogram_manual_timeAveraging)
343 TERM (U"##Quefrency averaging window (s)#")
344 DEFINITION (PowerCepstrum_manual_quefrencyAveragingWindow)
345 TERM (U"##Peak search pitch range (Hz)#")
346 DEFINITION (PowerCepstrum_manual_pitchRange)
347 TERM (U"##Tolerance#")
348 DEFINITION (U"")
349 TERM (U"##Interpolation#")
350 DEFINITION (U"determines how the @@vector peak interpolation|amplitude and position of a peak are determined@.")
351 TERM (U"##Trend line quefrency range (s)#")
352 DEFINITION (PowerCepstrum_manual_trendRange)
353 TERM (U"##Trend type#")
354 DEFINITION (PowerCepstrum_manual_trendType)
355 TERM (U"##Fit method#")
356 DEFINITION (PowerCepstrum_manual_fitMethod)
357 MAN_END
358
359 MAN_BEGIN (U"PowerCepstrogram: To Table (cepstral peak prominences)...", U"djmw", 20210916)
360 INTRO (U"A command to create a table with @@PowerCepstrum: Get peak prominence...|cepstral peak prominence@ values.")
361 ENTRY (U"Settings")
362 SCRIPT (5, Manual_SETTINGS_WINDOW_HEIGHT (7.8), U""
363 Manual_DRAW_SETTINGS_WINDOW ("PowerCepstrogram: To Table (cepstral peak prominences)", 7.8) // 9 - 4 * 0.3 (four is the number of additional radio buttons)
364 Manual_DRAW_SETTINGS_WINDOW_RANGE("Peak search pitch range (Hz)", U"60.0", U"300.0")
365 Manual_DRAW_SETTINGS_WINDOW_CHOICE (U"Interpolation", U"None", 0)
366 "y -= 12\n"
367 Manual_DRAW_SETTINGS_WINDOW_CHOICE (U"", U"parabolic", 1)
368 "y -= 12\n"
369 Manual_DRAW_SETTINGS_WINDOW_CHOICE (U"", U"cubic", 0)
370 "y -= 12\n"
371 Manual_DRAW_SETTINGS_WINDOW_CHOICE (U"", U"sinc70", 0)
372 "y -= 12\n"
373 Manual_DRAW_SETTINGS_WINDOW_CHOICE (U"", U"sinc700", 0)
374 Manual_DRAW_SETTINGS_WINDOW_RANGE ("Trend line quefrency range (s)", U"0.001", U"0.05")
375 Manual_DRAW_SETTINGS_WINDOW_OPTIONMENU (U"Trend type", U"Exponential decay")
376 Manual_DRAW_SETTINGS_WINDOW_OPTIONMENU (U"Fit method", U"Robust")
377 )
378 NORMAL (U"The meaning of these settings is explained @@PowerCepstrum: Get peak prominence...|here@.")
379 MAN_END
380
381 MAN_BEGIN(U"PowerCepstrogram: Paint...", U"djmw", 20131001)
382 INTRO (U"A command to draw the selected @@PowerCepstrogram@ object(s) in shades of grey.")
383 ENTRY (U"Settings")
384 SCRIPT (5, Manual_SETTINGS_WINDOW_HEIGHT (7), U""
385 Manual_DRAW_SETTINGS_WINDOW (U"PowerCepstrogram: Paint", 7)
386 Manual_DRAW_SETTINGS_WINDOW_RANGE("Time range (s)", U"0.0", U"0.0")
387 Manual_DRAW_SETTINGS_WINDOW_RANGE("Quefrency range (s)", U"0.0", U"0.0")
388 Manual_DRAW_SETTINGS_WINDOW_FIELD("Maximum (dB)", U"80.0")
389 Manual_DRAW_SETTINGS_WINDOW_BOOLEAN("Autoscaling",0)
390 Manual_DRAW_SETTINGS_WINDOW_FIELD("Dynamic range (dB)", U"30.0")
391 Manual_DRAW_SETTINGS_WINDOW_FIELD("Dynamic compression (0-1)", U"0.0")
392 Manual_DRAW_SETTINGS_WINDOW_BOOLEAN("Garnish",1)
393 )
394 TERM (U"##Time range (s)")
395 DEFINITION (U"the time domain along the %%x% axis.")
396 TERM (U"##Quefrency range (s)")
397 DEFINITION (U"the quefency domain along the %%y% axis.")
398 TERM (U"##Maximum (dB)")
399 DEFINITION (U"cells that have cepstral values greater or equal than this value are drawn in black.")
400 TERM (U"##Autoscaling")
401 DEFINITION (U"If %%on%, overrules the effects of the previous option and the following three options. I.e. the global maximum and the "
402 "global minimum cepstral values determine the maximum blackness and the minimal blackness. Values in-between have apropriate "
403 "values of grey.")
404 TERM (U"##Dynamic range (dB)")
405 DEFINITION (U"All values more than %%Dynamic range% below the maximum will be drawn in white. Values in-between have apropriate "
406 "values of grey.")
407 TERM (U"##Dynamic compression (0-1)")
408 DEFINITION (U"determines how much stronger weak frames should be made before drawing. Normally this parameter is between 0 and 1. "
409 "If it is 0, no dynamic compression will take place. If it is 1, all time frames (vertical bands) will contain cepstral values "
410 "that are drawn in black. If the global %%maximum% is set at 80 dB, %%autoscaling% is off, %%dynamic range% is 30 dB and "
411 "%%dynamic compression% is 0.4 then for a frame with a local maximum of 40 dB all values will be lifted by 0.4*(80-40)=16 dB, "
412 "so that its maximum will be seen at 56 dB (thus making the corresponding cell visible).")
413 TERM (U"##Garnish")
414 DEFINITION (U"Draws a box around the cepstrogram and labels the axes.")
415 MAN_END
416
417 MAN_BEGIN (U"PowerCepstrogram: Smooth...", U"djmw", 20201216)
418 INTRO (U"Smoothes the selected @PowerCepstrogram by averaging with a rectangular window. The smoothed PowerCepstrogram is the "
419 "result of two separate steps. "
420 "In the first step, cepstra are averaged across time. In the second step, cepstra are averaged across quefrency.")
421 ENTRY (U"Settings")
422 TERM (U"##Time averaging window (s)")
423 DEFINITION (PowerCepstrogram_manual_timeAveraging)
424 TERM (U"##Quefrency averaging window (s)")
425 DEFINITION (PowerCepstrum_manual_quefrencyAveragingWindow)
426 ENTRY (U"Note")
427 NORMAL (U"The following commands should reproduce the smoothing described in the @@Hillenbrand & Houde (1996)@ article, "
428 "where they use a 20 ms (10 frame) time smoothing and a 1 ms (10 bin) quefrency smoothing. ")
429 CODE (U"selectObject (\"Sound xxx\")")
430 CODE (U"To PowerCepstrogram: 60.0, 0.002, 5000.0, 50.0")
431 CODE (U"Smooth: 0.02, 0.001")
432 MAN_END
433
434 MAN_BEGIN (U"Cepstrum", U"djmw", 20130616)
435 INTRO (U"One of the @@types of objects@ in Praat.")
436 ENTRY (U"Description")
437 NORMAL (U"A Cepstrum is the log spectrum of the log power spectrum.")
438 MAN_END
439
440 MAN_BEGIN (U"PowerCepstrum", U"djmw", 20200403)
441 INTRO (U"One of the @@types of objects@ in Praat.")
442 ENTRY (U"Description")
443 NORMAL (U"A PowerCepstrum is the power spectrum of the log power spectrum. When drawn the vertical scale "
444 "will show the amplitude expressed in dB. The horizontal scale shows %%quefrency% in units of seconds. "
445 "It is calculated from the ##Spectrum# by a method described at @@Spectrum: To PowerCepstrum@.")
446 MAN_END
447
448 MAN_BEGIN (U"PowerCepstrum: Get peak prominence...", U"djmw", 20190912)
449 INTRO (U"Calculates the cepstral peak prominence measure (CPP) as defined by @@Hillenbrand et al. (1994)@")
450 NORMAL (U"The CPP measure is the difference in amplitude between the cepstral peak and the corresponding value on the trend "
451 "line that is directly below the peak (i.e., the predicted magnitude for the quefrency at the cepstral peak). "
452 "The CPP measure represents how far the cepstral peak emerges from the cepstrum background. ")
453 ENTRY (U"Settings")
454 SCRIPT (7, Manual_SETTINGS_WINDOW_HEIGHT (6.8), U""
455 Manual_DRAW_SETTINGS_WINDOW (U"PowerCepstrum: Get peak prominence", 6.8) // 8 - 4 * 0.3 (four is the number of additional radio buttons)
456 Manual_DRAW_SETTINGS_WINDOW_RANGE("Search peak in pitch range (s)", U"60.0", U"333.3")
457 Manual_DRAW_SETTINGS_WINDOW_CHOICE (U"Interpolation", U"None", 0)
458 "y -= 12\n"
459 Manual_DRAW_SETTINGS_WINDOW_CHOICE (U"", U"parabolic", 0)
460 "y -= 12\n"
461 Manual_DRAW_SETTINGS_WINDOW_CHOICE (U"", U"cubic", 1)
462 "y -= 12\n"
463 Manual_DRAW_SETTINGS_WINDOW_CHOICE (U"", U"sinc70", 0)
464 "y -= 12\n"
465 Manual_DRAW_SETTINGS_WINDOW_CHOICE (U"", U"sinc700", 0)
466 Manual_DRAW_SETTINGS_WINDOW_RANGE (U"Trend line quefrency range (s)", U"0.001", U"0.0 (= end)")
467 Manual_DRAW_SETTINGS_WINDOW_OPTIONMENU (U"Fit method", U"Robust")
468 )
469 TERM (U"##Search peak in pitch range")
470 DEFINITION (PowerCepstrum_manual_pitchRange)
471 TERM (U"##Interpolation")
472 DEFINITION (U"determines how the @@vector peak interpolation|amplitude and position of a peak are determined@.")
473 TERM (U"##Trend line quefrency range")
474 DEFINITION (PowerCepstrum_manual_trendRange)
475 TERM (U"##Trend type#")
476 DEFINITION (PowerCepstrum_manual_trendType)
477 TERM (U"##Fit method")
478 DEFINITION (PowerCepstrum_manual_fitMethod)
479 ENTRY (U"Examples")
480 NORMAL (U"Next picture of a PowerCepstrum with its straight blue trend line and its corresponding "
481 "peak prominence value was generated with the following script. Note that the first four lines in the "
482 "script are only necessary to generate a PowerCepstrum of a part of a vowel. ")
483 CODE (U"Create KlattGrid from vowel: \"a\", 0.3, 125, 800, 80, 1200, 80, 2300, 100, 2800, 0.1, 1000")
484 CODE (U"To Sound")
485 CODE (U"To PowerCepstrogram: 60, 0.002, 5000, 50")
486 CODE (U"To PowerCepstrum (slice): 0.1")
487 CODE (U"prominence = Get peak prominence: 60, 333.3, \"parabolic\", 0.001, 0.05, \"straight\", \"robust slow\"")
488 CODE (U"Text top: \"no\", \"Peak prominence = \" + fixed$ (prominence, 2) + \" dB\"")
489 CODE (U"Draw: 0, 0, 0, 110, \"yes\"")
490 CODE (U"Colour: \"blue\"")
491 CODE (U"Draw trend line: 0, 0, 0, 110, 0.001, 0.05, \"straight\", \"robust slow\"")
492 CODE (U"Colour: \"black\"")
493 CODE (U"Text top: \"no\", \"Peak prominence = \" + fixed$ (prominence, 2) + \" dB\"")
494 SCRIPT (5, 3, U""
495 "kg = Create KlattGrid from vowel: \"a\", 0.3, 125, 800, 80, 1200, 80, 2300, 100, 2800, 0.1, 1000\n"
496 "vowel = To Sound\n"
497 "cepstrogram = To PowerCepstrogram: 60, 0.002, 5000, 50\n"
498 "cepstrum = To PowerCepstrum (slice): 0.1\n"
499 "prominence = Get peak prominence: 60, 333.3, \"parabolic\", 0.001, 0.05, \"straight\", \"robust slow\"\n"
500 "Text top: \"no\", \"Peak prominence = \" + fixed$ (prominence, 2) + \" dB\"\n"
501 "Draw: 0, 0, 0, 110, \"yes\"\n"
502 "Colour: \"Blue\"\n"
503 "Draw trend line: 0, 0, 0, 110, 0.001, 0.05, \"straight\", \"robust slow\"\n"
504 "Colour: \"Black\"\n"
505 "Text top: \"no\", \"Peak prominence = \" + fixed$ (prominence, 2) + \" dB\"\n"
506 "removeObject: kg, vowel, cepstrogram, cepstrum\n")
507 NORMAL (U"In the next picture the trend line is of exponential decay type and consequently the "
508 "peak prominence value has changed a little bit.")
509 SCRIPT (5, 3, U""
510 "kg = Create KlattGrid from vowel: \"a\", 0.3, 125, 800, 80, 1200, 80, 2300, 100, 2800, 0.1, 1000\n"
511 "vowel = To Sound\n"
512 "cepstrogram = To PowerCepstrogram: 60, 0.002, 5000, 50\n"
513 "cepstrum = To PowerCepstrum (slice): 0.1\n"
514 "prominence = Get peak prominence: 60, 333.3, \"parabolic\", 0.001, 0.05, \"exponential decay\", \"robust slow\"\n"
515 "Text top: \"no\", \"Peak prominence = \" + fixed$ (prominence, 2) + \" dB\"\n"
516 "Draw: 0, 0, 0, 110, \"yes\"\n"
517 "Colour: \"Blue\"\n"
518 "Draw trend line: 0, 0, 0, 110, 0.001, 0.05, \"exponential decay\", \"robust slow\"\n"
519 "Colour: \"Black\"\n"
520 "Text top: \"no\", \"Peak prominence = \" + fixed$ (prominence, 2) + \" dB\"\n"
521 "removeObject: kg, vowel, cepstrogram, cepstrum\n")
522
523 MAN_END
524
525 MAN_BEGIN (U"PowerCepstrum: Draw...", U"djmw", 20190914)
526 INTRO (U"A command to draw the selected @@PowerCepstrum@.")
527 ENTRY (U"Settings")
528 TERM (U"##Quefrency range (s)#")
529 DEFINITION (U"define the extrema on the horizontal scale of the picture.")
530 TERM (U"##Amplitude range (dB)#")
531 DEFINITION (U"define the extrema on the vertical scale of the picture")
532 ENTRY (U"Remark")
533 NORMAL (U"Cepstrum values are drawn as 20\\.clog10 (value +\\ep), "
534 "where \\ep is a small number that avoids taking the logarithm of zero if the cepstrum value happens to be zero.")
535 MAN_END
536
537 MAN_BEGIN (U"PowerCepstrum: Draw trend line...", U"djmw", 20191008)
538 INTRO (U"Draws the line that models the background of the selected @@PowerCepstrum@.")
539 ENTRY (U"Settings")
540 TERM (U"##Quefrency range (s)#")
541 DEFINITION (U"define the extrema on the horizontal scale of the picture.")
542 TERM (U"##Amplitude range (dB)#")
543 DEFINITION (U"define the extrema on the vertical scale of the picture")
544 TERM (U"##Trend line quefrency range (s)")
545 DEFINITION (PowerCepstrum_manual_trendRange)
546 TERM (U"##Trend type#")
547 DEFINITION (PowerCepstrum_manual_trendType)
548 TERM (U"##Fit method")
549 DEFINITION (PowerCepstrum_manual_fitMethod)
550 ENTRY (U"Examples")
551 NORMAL (U"The next picture shows a PowerCepstrum with %%two% drawn trend lines, a straight line in blue "
552 "and an exponential decay line in green. The picture was generated by the following script. "
553 "Note that the first four lines in the script are only necessary to generate a PowerCepstrum of a part of a vowel.")
554 CODE (U"Create KlattGrid from vowel: \"a\", 0.3, 125, 800, 80, 1200, 80, 2300, 100, 2800, 0.1, 1000")
555 CODE (U"To Sound")
556 CODE (U"To PowerCepstrogram: 60, 0.002, 5000, 50")
557 CODE (U"To PowerCepstrum (slice): 0.1")
558 CODE (U"Draw: 0, 0, 0, 110, \"yes\"")
559 CODE (U"Colour: \"Blue\"")
560 CODE (U"Draw trend line: 0, 0, 0, 110, 0.001, 0.05, \"Straight\", \"Robust slow\"")
561 CODE (U"Colour: \"Green\"")
562 CODE (U"Draw trend line: 0, 0, 0, 110, 0.001, 0.05, \"Exponential decay\", \"Robust slow\"")
563 CODE (U"Colour: \"Black\"")
564 SCRIPT (5, 3, U""
565 "kg = Create KlattGrid from vowel: \"a\", 0.3, 125, 800, 80, 1200, 80, 2300, 100, 2800, 0.1, 1000\n"
566 "vowel = To Sound\n"
567 "cepstrogram = To PowerCepstrogram: 60, 0.002, 5000, 50\n"
568 "cepstrum = To PowerCepstrum (slice): 0.1\n"
569 "Draw: 0, 0, 0, 110, \"yes\"\n"
570 "Colour: \"Blue\"\n"
571 "Draw trend line: 0, 0, 0, 110, 0.001, 0.05, \"Straight\", \"Robust slow\"\n"
572 "Colour: \"Green\"\n"
573 "Draw trend line: 0, 0, 0, 110, 0.001, 0.05, \"Exponential decay\", \"Robust slow\"\n"
574 "Colour: \"Black\"\n"
575 "removeObject: kg, vowel, cepstrogram, cepstrum\n")
576 MAN_END
577
578 MAN_BEGIN (U"PowerCepstrum: Get peak...", U"djmw", 20190910)
579 INTRO (U"Get the amplitude of the peak in the selected @@PowerCepstrum@.")
580 ENTRY (U"Settings")
581 TERM (U"##Search peak in pitch range (Hz)#")
582 DEFINITION (PowerCepstrum_manual_pitchRange)
583 TERM (U"##Interpolation#")
584 DEFINITION (U"determines how the @@vector peak interpolation|amplitude and position of a peak are determined@.")
585 MAN_END
586
587 MAN_BEGIN (U"PowerCepstrum: Get quefrency of peak...", U"djmw", 20190910)
588 INTRO (U"A command to get the quefrency of the peak in the selected @@PowerCepstrum@.")
589 ENTRY (U"Settings")
590 TERM (U"##Search peak in pitch range (Hz)#")
591 DEFINITION (PowerCepstrum_manual_pitchRange)
592 TERM (U"##Interpolation#")
593 DEFINITION (U"determines how the @@vector peak interpolation|amplitude and position of a peak are determined@.")
594 MAN_END
595
596 MAN_BEGIN (U"PowerCepstrum: Get trend line slope...", U"djmw", 20190910)
597 INTRO (U"A command to calculate the slope of the line that models the cepstrum background of the selected @@PowerCepstrum@.")
598 ENTRY (U"Settings")
599 TERM (U"##Trend line quefrency range (s)#")
600 DEFINITION (PowerCepstrum_manual_trendRange)
601 TERM (U"##Trend type#")
602 DEFINITION (PowerCepstrum_manual_trendType)
603 TERM (U"##Fit method")
604 DEFINITION (PowerCepstrum_manual_fitMethod)
605 MAN_END
606
607 MAN_BEGIN (U"PowerCepstrum: Get trend line intercept...", U"djmw", 20190910)
608 INTRO (U"A command to calculate the intercept of the line that models the cepstrum background of the selected @@PowerCepstrum@.")
609 ENTRY (U"Settings")
610 TERM (U"##Trend line quefrency range (s)#")
611 DEFINITION (PowerCepstrum_manual_trendRange)
612 TERM (U"##Trend type#")
613 DEFINITION (PowerCepstrum_manual_trendType)
614 TERM (U"##Fit method")
615 DEFINITION (PowerCepstrum_manual_fitMethod)
616 MAN_END
617
618 MAN_BEGIN (U"PowerCepstrum: Smooth...", U"djmw", 20191005)
619 INTRO (U"A command to smooth the selected @@PowerCepstrum@ by averaging values at successive quefrencies.")
620 ENTRY (U"Settings")
621 TERM (U"##Quefrency averaging window (s)#")
622 DEFINITION (PowerCepstrum_manual_quefrencyAveragingWindow)
623 TERM (U"##Number of iterations#")
624 DEFINITION (U"determines how often the averaging will take place. If chosen 2, for example, the output PowerCepstrum "
625 "after the first averaging will be averaged once again.")
626 ENTRY (U"Examples")
627 NORMAL (U"The figure below is the PowerCepstrum taken from an artificial /a/ vowel synthesized as follows:")
628 CODE (U"Create KlattGrid from vowel: \"a\", 0.3, 125, 800, 80, 1200, 80, 2300, 100, 2800, 0.1, 1000")
629 CODE (U"To Sound")
630 CODE (U"To PowerCepstrogram: 60, 0.002, 5000, 50")
631 CODE (U"To PowerCepstrum (slice): 0.1")
632 CODE (U"prominence = Get peak prominence: 60, 333.3, \"Parabolic\", 0.001, 0.05, \"Straight\", \"Robust slow\"")
633 CODE (U"Draw: 0, 0, 0, 110, \"yes\"")
634 CODE (U"Text top: \"no\", \"Peak prominence = \" + fixed$ (prominence, 2) + \" dB\"")
635 SCRIPT (5, 3, U""
636 "kg = Create KlattGrid from vowel: \"a\", 0.3, 125, 800, 80, 1200, 80, 2300, 100, 2800, 0.1, 1000\n"
637 "vowel = To Sound\n"
638 "cepstrogram = To PowerCepstrogram: 60, 0.002, 5000, 50\n"
639 "cepstrum = To PowerCepstrum (slice): 0.3\n"
640 "prominence = Get peak prominence: 60, 333.3, \"Parabolic\", 0.001, 0.05, \"Straight\", \"Robust slow\"\n"
641 "Draw: 0, 0, 0, 110, \"yes\"\n"
642 "Text top: \"no\", \"Peak prominence = \" + fixed$ (prominence, 2) + \" dB\"\n"
643 "removeObject: kg, vowel, cepstrogram, cepstrum\n")
644 NORMAL (U"After 1 iteration with an averaging window of 0.0005 s the PowerCepstrum is:")
645 SCRIPT (5, 3, U""
646 "kg = Create KlattGrid from vowel: \"a\", 0.3, 125, 800, 80, 1200, 80, 2300, 100, 2800, 0.1, 1000\n"
647 "vowel = To Sound\n"
648 "cepstrogram = To PowerCepstrogram: 60, 0.002, 5000, 50\n"
649 "cepstrum = To PowerCepstrum (slice): 0.3\n"
650 "smooth = Smooth: 0.0005, 1\n"
651 "prominence = Get peak prominence: 60, 333.3, \"Parabolic\", 0.001, 0.05, \"Straight\", \"Robust slow\"\n"
652 "Text top: \"no\", \"Peak prominence = \" + fixed$ (prominence, 2) + \" dB\"\n"
653 "Draw: 0, 0, 0, 110, \"yes\"\n"
654 "removeObject: kg, vowel, cepstrogram, cepstrum, smooth\n")
655 NORMAL (U"After 2 iterations with an averaging window of 0.0005 s the PowerCepstrum is:")
656 SCRIPT (5, 3, U""
657 "kg = Create KlattGrid from vowel: \"a\", 0.3, 125, 800, 80, 1200, 80, 2300, 100, 2800, 0.1, 1000\n"
658 "vowel = To Sound\n"
659 "cepstrogram = To PowerCepstrogram: 60, 0.002, 5000, 50\n"
660 "cepstrum = To PowerCepstrum (slice): 0.3\n"
661 "smooth = Smooth: 0.0005, 2\n"
662 "prominence = Get peak prominence: 60, 333.3, \"Parabolic\", 0.001, 0.05, \"Straight\", \"Robust slow\"\n"
663 "Draw: 0, 0, 0, 110, \"yes\"\n"
664 "Text top: \"no\", \"Peak prominence = \" + fixed$ (prominence, 2) + \" dB\"\n"
665 "removeObject: kg, vowel, cepstrogram, cepstrum, smooth\n")
666 MAN_END
667
668 MAN_BEGIN (U"PowerCepstrum: Subtract trend...", U"djmw", 20190914)
669 INTRO (U"Subtract the cepstrum trend from the selected @@PowerCepstrum@.")
670 ENTRY (U"Settings")
671 TERM (U"##Trend line quefrency range (s)#")
672 DEFINITION (PowerCepstrum_manual_trendRange)
673 TERM (U"##Trend type#")
674 DEFINITION (PowerCepstrum_manual_trendType)
675 TERM (U"##Fit method#")
676 DEFINITION (PowerCepstrum_manual_fitMethod)
677 MAN_END
678
679 MAN_BEGIN (U"Formant & Spectrogram: To IntensityTier...", U"djmw", 20130109)
680 INTRO (U"Determines the formant intensities from the selected Spectrogram.")
681 NORMAL (U"The intensities at the frequencies of the selected formant are copied from the corresponding positions in the spectrogram. "
682 "If the selected formant doesn't exist in a particular frame, then a large negative value (< -200 dB) is substituted instead. "
683 "Because the values in the spectrogram are expressed in Pa^^2^/Hz, the units in the intensity tier are in dB/Hz. ")
684 MAN_END
685
686 MAN_BEGIN (U"LFCC", U"djmw", 20040421)
687 INTRO (U"One of the @@types of objects@ in Praat.")
688 NORMAL (U"An object of type LFCC represents cepstral "
689 "coefficients on a linear frequency scale as a function of time. "
690 "The coefficients are represented in frames with constant sampling "
691 "period.")
692 ENTRY (U"#LFCC commands")
693 NORMAL (U"Creation:")
694 LIST_ITEM (U"\\bu @@LPC: To LFCC...")
695 MAN_END
696
697 MAN_BEGIN (U"LFCC: To LPC...", U"djmw", 20040407)
698 INTRO (U"You can choose this command after selecting 1 or more @LFCC's.")
699 ENTRY (U"Settings")
700 TERM (U"##Number of coefficients")
701 DEFINITION (U"the desired number of linear predictive coefficients.")
702 ENTRY (U"Behaviour")
703 NORMAL (U"The transformation from cepstral coefficients to %a-coefficients "
704 "as described in @@Markel & Gray (1976)@.")
705 MAN_END
706
707 MAN_BEGIN (U"LPC", U"djmw", 19990610)
708 INTRO (U"One of the @@types of objects@ in Praat.")
709 NORMAL (U"An object of type LPC represents filter coefficients as a function of time. "
710 "The coefficients are represented in frames with constant sampling period.")
711 ENTRY (U"LPC commands")
712 NORMAL (U"Creation:")
713 LIST_ITEM (U"\\bu @@Sound: To LPC (autocorrelation)...@")
714 LIST_ITEM (U"\\bu @@Sound: To LPC (covariance)...@")
715 LIST_ITEM (U"\\bu @@Sound: To LPC (burg)...@")
716 LIST_ITEM (U"\\bu @@Sound: To LPC (marple)...@")
717 ENTRY (U"Conversion")
718 LIST_ITEM (U"\\bu @@LPC: To LFCC...|To LFCC...@")
719 LIST_ITEM (U"\\bu @@LPC: To Spectrogram...|To Spectrogram...@")
720 LIST_ITEM (U"\\bu @@LPC: To Spectrum (slice)...|To Spectrum (slice)...@")
721 LIST_ITEM (U"\\bu @@LPC: To Polynomial (slice)...|To Polynomial (slice)...@")
722 MAN_END
723
724 MAN_BEGIN (U"LPC: Draw gain...", U"djmw", 20040407)
725 INTRO (U"You can choose this command after selecting 1 or more @LPC objects.")
726 ENTRY (U"Settings")
727 TERM (U"##From time (s)#, ##To time (seconds)#")
728 DEFINITION (U"the time domain along the %x-axis.")
729 TERM (U"##Minimum gain#, ##Maximum gain#")
730 DEFINITION (U"the range for the %y-axis.")
731 TERM (U"##Garnish")
732 DEFINITION (U"determines whether to draw a bounding box and axis labels.")
733 ENTRY (U"Behaviour")
734 NORMAL (U"Gain will be drawn as a function of time (gain also equals the prediction error "
735 "energy). ")
736 MAN_END
737
738 MAN_BEGIN (U"LPC: Draw poles...", U"djmw", 20040407)
739 INTRO (U"You can choose this command after selecting 1 or more @LPC objects.")
740 ENTRY (U"Settings")
741 TERM (U"##Time (s)")
742 DEFINITION (U"the time of the nearest frame.")
743 ENTRY (U"Behaviour")
744 NORMAL (U"The @@Roots|roots@ of the @@LPC: To Polynomial (slice)...|linear prediction "
745 "polynomial@, constructed from the coefficients "
746 "of the analysis frame, will be drawn in the complex plane.")
747 MAN_END
748
749 MAN_BEGIN (U"LPC: To LFCC...", U"djmw", 20040407)
750 INTRO (U"You can choose this command after selecting 1 or more @LPC objects.")
751 ENTRY (U"Behaviour")
752 NORMAL (U"The transformation from a-coefficients to cepstral coefficients "
753 "as described in @@Markel & Gray (1976)@.")
754 ENTRY (U"Settings")
755 TERM (U"%%Number of coefficients%")
756 DEFINITION (U"the desired number of cepstral coefficients.")
757 MAN_END
758
759 MAN_BEGIN (U"LPC: To Matrix", U"djmw", 20011123)
760 INTRO (U"Copies the linear prediction coefficients of the selected @LPC "
761 "object to a newly created @Matrix object.")
762 ENTRY (U"Behaviour")
763 EQUATION (U"%z__%ji_ = %a__%ij_, with 1 \\<_ %i \\<_ %nx and "
764 "1 \\<_ j \\<_ %nCoefficients__%i_,")
765 NORMAL (U"where %z__%ji_ is the matrix element in row %j and column %i and "
766 "%a__%ij_ is the %j-th linear prediction coefficient in frame %i.")
767 MAN_END
768
769 MAN_BEGIN (U"LPC: To Formant", U"djmw", 19970123)
770 INTRO (U"You can choose this command after selecting 1 or more @LPC objects.")
771 ENTRY (U"Behaviour")
772 NORMAL (U"For each LPC frame, the zeros of the linear prediction polynomial are extracted. "
773 "Zeros that are outside the unit circle are reflected into it. "
774 "Next, formant frequencies and bandwidths are calculated from all the roots that have the "
775 "imaginary part positive, i.e., that lie in the upper half of the unit circle. "
776 "Formant frequencies smaller than 50 Hz or larger than (%nyquistFrequency - 50) are discarded. "
777 "The remaining frequencies and bandwidths are sorted "
778 "and copied to the Formant frame. Finally, the %gain field of the LPC is copied to the %intensity "
779 "field of the Formant frame.")
780 ENTRY (U"Algorithm")
781 NORMAL (U"The root finder is Laguerre's method followed by root polishing, see @@Press "
782 "et al. (1992)@.")
783 ENTRY (U"Warning")
784 LIST_ITEM (U"\\bu The formant values can be very inaccurate if you did not resample the Sound "
785 "before the LPC-analysis (consult the @@Source-filter synthesis@ tutorial).")
786 LIST_ITEM (U"\\bu The results of the root finder may not always be accurate when more than 30 "
787 "roots have to be found.")
788 MAN_END
789
790 MAN_BEGIN (U"LPC: To Polynomial (slice)...", U"djmw", 20260104)
791 INTRO (U"A command that creates a Polynomial object from each selected @LPC object.")
792 ENTRY (U"Settings")
793 TERM (U"##Time (s)")
794 DEFINITION (U"defines the LPC frame whose coefficients will be selected.")
795 ENTRY (U"Behaviour")
796 NORMAL (U"The linear prediction coefficients %a__1..%n_ of the LPC frame that is nearest to the"
797 " given time will be copied into polynomial coefficients %c__1..%n+1_ as follows:")
798 EQUATION (U"%c__%i_ = %a__%n\\--%i+1_ for %i=1..%n,")
799 EQUATION (U"%c__%n+1_ = 1")
800 MAN_END
801
802 MAN_BEGIN (U"LPC: To Spectrum (slice)...", U"djmw", 20071120)
803 INTRO (U"You can choose this command after selecting 1 or more @LPC objects.")
804 ENTRY (U"Settings")
805 TERM (U"##Time (s)")
806 DEFINITION (U"the time at which the Spectrum should be calculated.")
807 TERM (U"##Minimum frequency resolution (Hz)")
808 DEFINITION (U"successive frequencies in the @Spectrum "
809 "will be maximally this distance apart.")
810 TERM (U"##Bandwidth reduction (Hz)")
811 DEFINITION (U"formants with small bandwidths show up very well as peaks in the spectrum because the poles "
812 "lie close to the contour along which the spectrum is computed (the unit circle in the z-plane). "
813 "Peak enhancement can be realized by computing the spectrum in the z-plane along a contour of radius "
814 "%r = exp (\\-- %\\pi \\.c %bandwidthReduction / %samplingFrequency). "
815 "This technique is also called off-axis spectrum computation. "
816 "Negative values evaluate the spectrum on a contour %outside the unit circle and therefore result in a "
817 "flattened spectrum.")
818 TERM (U"##De-emphasis frequency (Hz)")
819 DEFINITION (U"Performs de-emphasis when frequency is in the interval (0, @@Nyquist frequency@)")
820 ENTRY (U"Algorithm")
821 NORMAL (U"The Spectrum at time %t will be calculated from the %nearest LPC frame according to:")
822 EQUATION (U"Spectrum (%f) = \\Vr(%gain\\.c%T/%df) / (1 + \\su__%k=1..%numberOfCoefficients_ %a__%k_%z^^\\--%k^),")
823 NORMAL (U"where %T is the sampling period and %z = exp (\\--2 %\\pi %i %f %T) and %df is the distance in Hz "
824 "between two successive components in the Spectrum.")
825 LIST_ITEM (U"1. Allocate a large enough buffer [1..%nfft] to perform an FFT analysis.")
826 LIST_ITEM (U"2. Make the first value of the buffer 1 and copy the prediction coefficients #a into "
827 "the buffer. This results in buffer values: (1, %a__1_, ..., %a__%numberOfCoefficients_, 0, ..., 0).")
828 LIST_ITEM (U"3. If ##De-emphasis frequency# is in the interval (0, %nyquistFrequency) then \"multiply\" "
829 "the buffer with (1 - %b %z^^\\--1^), where %b = exp (\\-- %\\pi %deEmphasisFrequency %T). "
830 "This results in buffer values: (1, %a__1_\\--%b, %a__2_\\--%b\\.c%a__1_, ..., "
831 "%a__%numberOfCoefficients_\\--%b\\.c%a__%numberOfCoefficients\\--1_, "
832 "\\--%b\\.c%a__%numberOfCoefficients_, 0, ..., 0). Note that the number of values in the buffer that differ from 0 "
833 "has increased by one.")
834 LIST_ITEM (U"4. If ##Bandwidth reduction# is greater than 0 then multiply corresponding values in the buffer by %g^^%i\\--1^ where "
835 "%g = exp (2%\\pi %bandwidthReduction %T / %nfft), and %i is the position index in the buffer. "
836 "%i runs from 1 to %numberOfCoefficients+1+%t, where %t equals 1 when de-emphasis was performed, "
837 "else 0.")
838 LIST_ITEM (U"5. Calculate the FFT spectrum of the buffer with the coefficients. This results in complex "
839 "amplitudes (%a__%j_,%b__%j_), %j=1..%nfft/2+1.")
840 LIST_ITEM (U"6. Calculate the LPC Spectrum by taking the inverse of the FFT spectrum, i.e., each complex "
841 "amplitude becomes (%a__%j_,%b__%j_)^^\\--1^ = (%a__%j_,\\--%b__%j_) / (%a__%j_^2 + %b__%j_^2)")
842 LIST_ITEM (U"7. Multiply all values with the scale factor \\Vr(%gain\\.c%T/%df).")
843 MAN_END
844
845 MAN_BEGIN (U"LPC: To Spectrogram...", U"djmw", 20040407)
846 INTRO (U"You can choose this command after selecting 1 or more @LPC objects.")
847 ENTRY (U"Settings")
848 TERM (U"##Minimum frequency resolution (Hz)")
849 DEFINITION (U"successive frequencies in the Spectrum will be maximally this distance apart")
850 TERM (U"##Bandwidth reduction (Hz)")
851 DEFINITION (U"formants with small bandwidths show up very well as darker regions in the spectrogram "
852 "because the poles lie close to the contour along which a spectrum is computed (the unit circle "
853 "in the z-plane). "
854 "Peak enhancement can be realized by computing a spectrum in the z-plane along a contour of radius "
855 "%r = exp (\\-- %\\pi \\.c %bandwidthReduction / %samplingFrequency).")
856 TERM (U"##De-emphasis frequency (Hz)")
857 DEFINITION (U"Performs de-emphasis when value is in the interval (0, @@Nyquist frequency@)")
858 ENTRY (U"Algorithm")
859 NORMAL (U"For each LPC frame the corresponding Spectrum will be calculated according to the algorithm "
860 "explained in @@LPC: To Spectrum (slice)...@. "
861 "For each frequency the power, i.e., the square of the complex values, will be stored in the "
862 "corresponding area in the Spectrogram.")
863 MAN_END
864
865 MAN_BEGIN (U"LPC: To VocalTract (slice)...", U"djmw", 20050615)
866 INTRO (U"You can choose this command after selecting 1 or more @LPC objects.")
867 ENTRY (U"Settings")
868 TERM (U"##Time (s)")
869 DEFINITION (U"the time of the nearest frame, in seconds.")
870 TERM (U"##Length (m)")
871 DEFINITION (U"the length of the vocal tract, in metres.")
872 /*
873 TERM (U"##Compute length according to Wakita")
874 DEFINITION (U"the length of the vocal tract is calculated according "
875 "to the algorithm as described in @@Wakita (1977)@.")
876 ENTRY (U"Behaviour")
877 NORMAL (U"A new @VocalTract area function is calculated from the prediction coefficients in the frame. ")
878 ENTRY (U"Warning")
879 NORMAL (U"If ##Compute length according to Wakita# is on, the optimal length is searched for in the range from 0.1 m to "
880 "0.25 m. This length calculation is extremely sensitive to the number of and the positions of the formants "
881 "with respect to the @@Nyquist frequency@. For example, there is a large difference "
882 "between the vocal tract length estimates if the highest formant is just below or just above the "
883 "Nyquist frequency. "
884 "The algorithm is not very reliable in vocal tract length estimation and we do not recommend using it. " )*/
885 MAN_END
886
887 MAN_BEGIN (U"LPC & Sound: Filter...", U"djmw", 20040407)
888 INTRO (U"A command that creates a new Sound object from one @Sound and one @LPC "
889 "object which have been selected together.")
890 ENTRY (U"Settings")
891 TERM (U"##Use LPC gain")
892 DEFINITION (U"Determines whether the gain from the LPC is used in the synthesis.")
893 ENTRY (U"Behaviour")
894 NORMAL (U"Filters the selected Sound by the selected LPC-filter.")
895 NORMAL (U"When the LPC-gain is used the samples in the new Sound will be "
896 "multiplied with the square root of the corresponding LPC-gain value.")
897 NORMAL (U"In #Z-domain notation: #O(%z) = #H(%z) \\.c #E(%z), where "
898 "#E(%z) is the selected filter input Sound, #H(%z) the selected LPC filter, "
899 "and, #O(%z) the filter output (the new Sound that will appear in the List of objects).")
900 MAN_END
901
902 MAN_BEGIN (U"LPC & Sound: Filter with filter at time...", U"djmw", 20101009)
903 INTRO (U"Filters the selected @Sound with a static filter that is formed by the filter coefficients "
904 "from only one @LPC frame.")
905 ENTRY (U"Settings")
906 TERM (U"##Channel")
907 DEFINITION (U"determines the sound channel to be filtered.")
908 TERM (U"##Use filter at time (s)")
909 DEFINITION (U"determines which LPC frame will be chosen to filter the sound. ")
910 MAN_END
911
912 MAN_BEGIN (U"LPC & Sound: Filter (inverse)", U"djmw", 19970126)
913 INTRO (U"A command that creates a new Sound object from one @Sound and one @LPC "
914 "object which have been selected together.")
915 ENTRY (U"Behaviour")
916 NORMAL (U"Given a filter (the selected LPC) and its output (the selected Sound), "
917 "its input is reconstructed (the new Sound that will appear in the List of objects).")
918 NORMAL (U"In Z-domain notation: #E(%z) = #O(%z) / #H(%z), where "
919 "#O(%z) is the filter output Sound, #H(%z) the LPC filter, and, #E(%z) the filter "
920 "input Sound. (Selecting this newly generated Sound and the LPC, choosing the command "
921 "##Filter...# generates a Sound that is identical to the Sound that originated "
922 "the LPC.)")
923 MAN_END
924
925 MAN_BEGIN (U"LPC & Sound: Filter (inverse) with filter at time...", U"djmw", 20101009)
926 INTRO (U"%%Inverse% filters the selected @Sound with a static inverse filter that is formed by the filter coefficients "
927 "from only one @LPC frame.")
928 ENTRY (U"Settings")
929 TERM (U"##Channel")
930 DEFINITION (U"determines the sound channel to be filtered.")
931 TERM (U"##Use filter at time (s)")
932 DEFINITION (U"determines which LPC frame will be chosen to inverse filter the sound. ")
933 MAN_END
934
935 MAN_BEGIN (U"MFCC", U"djmw", 20160225)
936 INTRO (U"One of the @@types of objects@ in Praat.")
937 NORMAL (U"An object of type MFCC represents mel frequency cepstral coefficients "
938 "as a function of time. The coefficients are represented in a number of frames centred at equally spaced times. "
939 "at constant sampling period.")
940 ENTRY (U"MFCC commands")
941 NORMAL (U"Creation:")
942 LIST_ITEM (U"\\bu @@Sound: To MFCC...@")
943 LIST_ITEM (U"\\bu @@MelSpectrogram: To MFCC...@")
944 MAN_END
945
946 MAN_BEGIN (U"MFCC: To MelFilter...", U"djmw", 20141023)
947 INTRO (U"A #deprecated command replaced by @@MFCC: To MelSpectrogram...@.")
948 ENTRY (U"Settings")
949 TERM (U"##From coefficient#, ##To coefficient#")
950 DEFINITION (U"the range of coefficients that will be used in the reconstruction.")
951 ENTRY (U"Details")
952 NORMAL (U"The output of the triangular filters in a mel filter bank will be "
953 "reconstructed by applying the inverse cosine transform:")
954 EQUATION (U"%P__%j_ = 2/N (%c__0_/2 + \\Si__%k=1_^^%N-1^ %c__%k_ cos (\\pi%k(%j-0.5)/%N))),")
955 NORMAL (U"where %N represents the number of filters, %j runs from 1 to %N, and coefficients %c__%k_ with %k less than "
956 "%%fromCoefficient% and %k larger than %%toCoefficient% take zero values in the evaluation.")
957 MAN_END
958
959 MAN_BEGIN (U"MFCC: To MelSpectrogram...", U"djmw", 20141023)
960 INTRO (U"A command to (re)construct a @MelSpectrogram object from the selected @MFCC object.")
961 ENTRY (U"Settings")
962 TERM (U"##From coefficient#, ##To coefficient#")
963 DEFINITION (U"the range of coefficients that will be used in the reconstruction.")
964 TERM (U"##Include constant term")
965 DEFINITION (U"selects whether or not to include the %c__0_ coefficient in the reconstruction. "
966 "As can be seen from the formula below, the contribution of the %c__0_ term is equal for each filter.")
967 ENTRY (U"Details")
968 NORMAL (U"The values %P__%j_ in each frame of the MelSpectrogram will be constructed by "
969 "applying the inverse Discrete Cosine Transform to the corresponding frame of the MFCC object:")
970 EQUATION (U"%P__%j_ = 2/N (%c__0_/2 + \\Si__%k=1_^^%N-1^ %c__%k_ cos (\\pi%k(%j-0.5)/%N))),")
971 NORMAL (U"where %N represents the number of filters that were used to get the MFCC object, %j runs from 1 to %N, "
972 "and coefficients %c__%k_ with %k less than "
973 "%%fromCoefficient% and %k larger than %%toCoefficient% take zero values in the evaluation.")
974 MAN_END
975
976 MAN_BEGIN (U"Sound: To PowerCepstrogram...", U"djmw", 20200403)
977 INTRO (U"A command that creates a @@PowerCepstrogram@ from every selected @@Sound@.")
978 ENTRY (U"Settings")
979 TERM (U"##Pitch floor (Hz)")
980 DEFINITION (U"determines the effective length of the analysis window as three periods of this pitch, "
981 "e.g. if the pitch floor is 60 Hz, the analysis window will be 3/60 = 0.05 seconds long.")
982 TERM (U"##Time step (s)")
983 DEFINITION (U"defines the distance between the centres of subsequent frames. This determines the number of frames "
984 "in the resulting PowerCepstrogram.")
985 TERM (U"##Maximum frequency (Hz)")
986 DEFINITION (U"the maximum frequency subject to analysis.")
987 TERM (U"##Pre-emphasis from (Hz)")
988 ENTRY (U"Algorithm")
989 NORMAL (U"The sound will first be resampled to twice the value of the %%Maximum frequency%, with "
990 "the algorithm described at @@Sound: Resample...@. After this, pre-emphasis is applied with the "
991 "algorithm described at @@Sound: Pre-emphasize (in-place)...@. For each analysis window a Gaussian "
992 "window is applied and the ##Spectrum# is calculated. "
993 "The Spectrum is then transformed to a ##PowerCepstrum# with the procedure described at @@Spectrum: To PowerCepstrum@. "
994 "Finally, the values from the PowerCepstrum are stored in the vertical slice of the PowerCepstrogram.")
995 MAN_END
996
997 MAN_BEGIN (U"Sound: To Formant (robust)...", U"djmw", 20111027)
998 INTRO (U"A command that creates a @@Formant@ object from every selected @@Sound@. ")
999 ENTRY (U"Settings")
1000 NORMAL (U"The settings for ##Time step (s)#, ##Maximum number of formants#, ##Formant ceiling (Hz), "
1001 "##Window length (s)# and ##Pre-emphasis from (Hz)# are as in @@Sound: To Formant (burg)...@. "
1002 " The following settings determine aspects of the iterative formant frequency refinement.")
1003 TERM (U"%%Number of std. dev.%,")
1004 DEFINITION (U"determines the number of standard deviations from where selective weighing of samples starts. ")
1005 TERM (U"%%Maximum number of iterations%,")
1006 DEFINITION (U"determines the maximum number of iterations allowed in the refinement step.")
1007 TERM (U"%%Tolerance%,")
1008 DEFINITION (U"detemines another stop ctriterion for the refinement step. If the relative change in variance "
1009 "between successive iterations is less then this value, iteration stops. Iteration stops whenever "
1010 "one of the two defined stop criteria is reached.")
1011 ENTRY (U"Algorithm")
1012 NORMAL (U"First the sound is downsampled to twice the maximum formant frequency. "
1013 "Next, the LPC coefficients are determined by the autocorrelation method. "
1014 "Finally, in an iterative procedure as described by @@Lee (1988)@, "
1015 "the formant frequencies and bandwidths are refined by selective weighting of samples values.")
1016 MAN_END
1017
1018 MAN_BEGIN (U"Sound: LPC analysis", U"djmw", 19970126)
1019 INTRO (U"You can perform this analysis by selecting one or more @Sound objects and "
1020 "choosing the appropriate command to generate an @LPC.")
1021 NORMAL (U"The acronym LPC stands for Linear Predictive Coding.")
1022 NORMAL (U"In the LPC analysis one tries to predict %x__%n_ on the basis of the %p previous samples,")
1023 EQUATION (U"%x\\'p__%n_ = \\su %a__%k_ %x__%%n-k%_")
1024 NORMAL (U"then {%a__1_, %a__2_, ..., %a__%p_} can be chosen to minimize the prediction power %%Q__p_% where")
1025 EQUATION (U"%%Q__p_% = E [ |%x__%n_ - %x\\'p__%n_|^2].")
1026 NORMAL (U"Several different algorithms exist for minimizing %%Q__p_%:")
1027 LIST_ITEM (U"\\bu @@Sound: To LPC (autocorrelation)...|To LPC (autocorrelation)...@")
1028 LIST_ITEM (U"\\bu @@Sound: To LPC (covariance)...|To LPC (covariance)...@")
1029 LIST_ITEM (U"\\bu @@Sound: To LPC (burg)...|To LPC (burg)...@")
1030 LIST_ITEM (U"\\bu @@Sound: To LPC (marple)...|To LPC (marple)...@")
1031 MAN_END
1032
1033 #define Sound_to_LPC_COMMON_HELP(method) \
1034 INTRO (U"With this command you create a new @LPC from every selected @Sound, " \
1035 "using " method " method.") \
1036 ENTRY (U"Warning") \
1037 NORMAL (U"You are advised not to use this command for formant analysis. " \
1038 "For formant analysis, instead use @@Sound: To Formant (burg)...@, " \
1039 "which also works via LPC (linear predictive coding). This is because " \
1040 "##Sound: To Formant (burg)...# lets you specify a maximum frequency, " \
1041 "whereas the ##To LPC# commands automatically use the @@Nyquist frequency@ " \
1042 "as their maximum frequency. If you do use one of the ##To LPC# commands " \
1043 "for formant analysis, you may therefore want to downsample the sound first. " \
1044 "For instance, if you want five formants below 5500 Hz but your Sound has a sampling frequency " \
1045 "of 44100 Hz, you have to downsample the sound to 11000 Hz with the @@Sound: Resample...@ command. " \
1046 "After that, you can use the ##To LPC# commands, with a prediction order of 10 or 11.") \
1047 ENTRY (U"Settings") \
1048 TERM (U"##Prediction order#") \
1049 DEFINITION (U"the number of linear prediction coefficients, also called the %%number of poles%. " \
1050 "Choose this number at least twice as large as the number of spectral peaks that you want " \
1051 "to detect.") \
1052 TERM (U"##Analysis window duration (s)") \
1053 DEFINITION (U"the effective duration of each analysis frame, in seconds.") \
1054 TERM (U"##Time step (s)") \
1055 DEFINITION (U"the time step between two consecutive analysis frames.") \
1056 TERM (U"##Pre-emphasis frequency (Hz)") \
1057 DEFINITION (U"a +6dB / octave filtering will be applied above this frequency. " \
1058 "A pre-emphasis frequency of 48.47 Hz for a signal with a sampling frequency of 10 kHz " \
1059 "approximately corresponds to a value of %a = 0.97 for the filter %y__%n_ = %x__%n_ - %a \\.c %x__%n-1_. " \
1060 "The relation between %a and the pre-emphasis frequency is: " \
1061 "%a = exp (\\--2\\.c%\\pi\\.c%preemphasisFrequency/%samplingFrequency). " \
1062 "If you do not want pre-emphasis, choose a frequency greater than the @@Nyquist frequency@.")
1063
1064 MAN_BEGIN (U"Sound: To LPC (autocorrelation)...", U"David Weenink & Paul Boersma", 20040407)
1065 Sound_to_LPC_COMMON_HELP ("the autocorrelation")
1066 ENTRY (U"Algorithm")
1067 NORMAL (U"The autocorrelation algorithm is decribed in @@Markel & Gray (1976)@.")
1068 MAN_END
1069
1070 MAN_BEGIN (U"Sound: To LPC (covariance)...", U"David Weenink & Paul Boersma", 20040407)
1071 Sound_to_LPC_COMMON_HELP ("the covariance")
1072 ENTRY (U"Algorithm")
1073 NORMAL (U"The covariance algorithm is decribed in @@Markel & Gray (1976)@.")
1074 MAN_END
1075
1076 MAN_BEGIN (U"Sound: To LPC (marple)...", U"djmw", 19970126)
1077 Sound_to_LPC_COMMON_HELP ("Marple's")
1078 TERM (U"##Tolerance 1")
1079 DEFINITION (U"stop the iteration when %E(%m) / %E(0) < %%Tolerance 1%, where %E(%m) is the "
1080 "prediction error for order %m.")
1081 TERM (U"##Tolerance 2")
1082 DEFINITION (U"stop the iteration when (%E(%m) - %E(%m-1)) / %E(%m-1) < %%Tolerance 2.")
1083 ENTRY (U"Algorithm")
1084 NORMAL (U"The algorithm is described in @@Marple (1980)@.")
1085 MAN_END
1086
1087 MAN_BEGIN (U"Sound: To LPC (burg)...", U"David Weenink & Paul Boersma", 20040407)
1088 Sound_to_LPC_COMMON_HELP ("Burg's")
1089 ENTRY (U"Algorithm")
1090 NORMAL (U"Burg's algorithm is described in @@Anderson (1978)@")
1091 MAN_END
1092
1093 MAN_BEGIN (U"Sound: To MFCC...", U"djmw", 20141022)
1094 INTRO (U"A command that creates a @MFCC object from every selected @Sound "
1095 "object.")
1096 NORMAL (U"The analysis proceeds in two steps:")
1097 LIST_ITEM (U"1. We perform a spectrum analysis on a mel frequency scale "
1098 "(see @@Sound: To MelSpectrogram...@ for details).")
1099 LIST_ITEM (U"2. We convert the melspectrogram values to mel frequency cepstral "
1100 "coefficients (see @@MelSpectrogram: To MFCC...@ for details).")
1101 MAN_END
1102
1103 MAN_BEGIN (U"Spectrum: To PowerCepstrum", U"djmw", 20190908)
1104 INTRO (U"A command to create a @PowerCepstrum from every selected @Spectrum.")
1105 ENTRY (U"Mathematical procedure")
1106 NORMAL (U"The spectrum %X(%f) is transformed to a new spectrum %%X%\\'p(%f), where "
1107 "Re(%X\\'p(%f)) = ln (Re(%X(%f))^^2^ + Im(%X(%f))^^2^) and Im(%X\\'p(%f)) = 0.")
1108 NORMAL (U"The new spectrum %X\\'p(%f) is then transformed to a Sound %x(%t) by means of an inverse Fourier "
1109 "transform as is described in @@Spectrum: To Sound@. The %%squares% of the transformed "
1110 "values, %x(%t)^^2^, are stored in the ##PowerCepstrum#.")
1111 MAN_END
1112
1113 MAN_BEGIN (U"VocalTractTier", U"djmw", 20120423)
1114 INTRO (U"One of the @@types of objects@ in Praat. A VocalTractTier objects contains a number of (%%time%, %%VocalTract%) "
1115 "points, where a @@VocalTract@ represents the area function of the vocal tract expressed as m^^2^, running from the glottis to the lips.")
1116 MAN_END
1117
1118 MAN_BEGIN (U"theil regression", U"djmw", 20190909)
1119 NORMAL (U"a robust linear regression method, first proposed by @@Theil (1950)@. The slope of the regression line is estimated as "
1120 "the median of all pairwise slopes between each pair of points in the data set. Because this number of pairs increases quadratically "
1121 "with the number of data points, we have implemented a somewhat less computationally intensive procedure, the %%incomplete% "
1122 "theil regression. In the incomplete method we first split the data set of %N data points (%x__%i_, %y__%i_), %i = 1..%N, "
1123 "in two equal sets of size %N/2 and then calculate %N/2 slopes as ")
1124 EQUATION (U"%m__%i_ = (%y__%N/2+%i_ - %y__%i_) / (%x__%N/2+%i_ - %x__%i_), for %i = 1..%N/2.")
1125 NORMAL (U"The regression slope %m is calculated as the median of these %N/2 values %m__%i_.")
1126 NORMAL (U"Given the slope %m, the offset %b is calculated as the median of the %N values %b__%i_= %y__%i_ - %m\\.c%x__%i_.")
1127 NORMAL (U"The theil regression has a breakdown point of 29.3\\% , which means that it can tolerate arbitrary corruption of up to "
1128 "29.3\\% of the input data-points without degradation of its accuracy")
1129 MAN_END
1130
1131 MAN_BEGIN (U"Ammar et al. (2001)", U"djmw", 20200416)
1132 NORMAL (U"G.S. Ammar, D. Calvetti, W.B. Gragg, L. Reichel (2001): \"Polynomial zero finders based on Szegö polynomials\", "
1133 "%%Journal of Computational and Applied Mathematics% #127: 1\\-–16.")
1134 MAN_END
1135
1136 MAN_BEGIN (U"Anderson (1978)", U"djmw", 20030701)
1137 NORMAL (U"N. Anderson (1978): \"On the calculation of filter coefficients for "
1138 "maximum entropy spectral analysis.\" In Childers: %%Modern Spectrum Analysis%, "
1139 "IEEE Press: 252\\--255.")
1140 MAN_END
1141
1142 MAN_BEGIN (U"Deng et al. (2006)", U"djmw", 20210310)
1143 NORMAL (U"L. Deng, X. Cui, R. Pruvenok, J. Huang, S. Momen, Y. Chen & A. Alwan (2006): \"A database of "
1144 "vocal tract resonance trajectories for research in speech processing\", %%Proceedings of the IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP)%, Toulouse, France, May 2006.")
1145 MAN_END
1146
1147 MAN_BEGIN (U"Fleisher et al. (2015)", U"djmw", 20191008)
1148 NORMAL (U"M. Fleisher, S. Pinkert, W. Mattheus, A. Mainka & D. Mürbe (2015): \"Formant frequencies and bandwidths of the vocal "
1149 "transfer function are affected by the mechanical impedance of the vocal tract wall.\", %%Biomech Model Mechanobiol% #14: 719\\--733.")
1150 MAN_END
1151
1152 MAN_BEGIN (U"Hawks & Miller (1995)", U"djmw", 20191008)
1153 NORMAL (U"J. Hawks & J. Miller (1995): \"A formant bandwidth estimation procedure for vowel synthesis.\", "
1154 "%%Journal of the Acoustical Society of America% #97: 1343\\--1344.")
1155 MAN_END
1156
1157 MAN_BEGIN (U"Hillenbrand et al. (1994)", U"djmw", 20121017)
1158 NORMAL (U"J. Hillenbrand, R.A. Cleveland & R.L. Erickson (1994): \"Acoustic correlates of breathy vocal quality\", "
1159 "%%Journal of speech and hearing research% #37: 769\\--778.")
1160 MAN_END
1161
1162 MAN_BEGIN (U"Hillenbrand & Houde (1996)", U"djmw", 20121203)
1163 NORMAL (U"J. Hillenbrand & R.A. Houde (1996): \"Acoustic correlates of breathy vocal quality: Dysphonic voices and continuous "
1164 "speech\", %%Journal of speech and hearing research% #39: 311\\--321.")
1165 MAN_END
1166
1167 MAN_BEGIN (U"Jacquelin (2009)", U"djmw", 20210126)
1168 NORMAL (U"J. Jacquelin (2009): \"Régressions et équations intégrales\", https://fr.scribd.com/doc/14674814/Regressions-et-equations-integrales: 1\\--84.")
1169 MAN_END
1170
1171 MAN_BEGIN (U"Lee (1988)", U"djmw", 20111027)
1172 NORMAL (U"C.-H. Lee (1988): \"On robust linear prediction of speech.\", %%IEEE Trans. on ASSP% #36: 642\\--649.")
1173 MAN_END
1174
1175 MAN_BEGIN (U"Markel & Gray (1976)", U"djmw", 19980114)
1176 NORMAL (U"J.D. Markel & A.H. Gray, Jr. (1976): %%Linear prediction of speech.% "
1177 "Springer Verlag, Berlin.")
1178 MAN_END
1179
1180 MAN_BEGIN (U"Marple (1980)", U"djmw", 19980114)
1181 NORMAL (U"L. Marple (1980): \"A new autoregressive spectrum analysis algorithm.\" "
1182 "%%IEEE Trans. on ASSP% #28, 441\\--454.")
1183 MAN_END
1184
1185 MAN_BEGIN (U"Rothweiler (1999)", U"djmw", 20160507)
1186 NORMAL (U"J. Rothweiler (1999): \"On polynomial reduction in the computation of LSP frequencies.\" "
1187 "%%IEEE Trans. on ASSP% #7, 592\\--594.")
1188 MAN_END
1189
1190 MAN_BEGIN (U"Theil (1950)", U"djmw", 20121118)
1191 NORMAL (U"H. Theil (1950): \"A rank-invariant method of linear and polynomial regression analysis\", "
1192 "%%Proceedings of Koninklijke Nederlandse Akademie van Wetenschappen% ##A.53#: 1397\\--1412.")
1193 MAN_END
1194
1195 MAN_BEGIN (U"Wakita (1977)", U"djmw", 19980114)
1196 NORMAL (U"H. Wakita (1977): \"Normalization of vowels by vocal-tract "
1197 "length and its application to vowel identification.\" %%IEEE Trans. on ASSP% "
1198 "#25: 183\\--192.")
1199 MAN_END
1200
1201 MAN_BEGIN (U"Weenink (2015)", U"djmw", 20200514)
1202 NORMAL (U"D. Weenink (2015): \"Improved formant frequency measurements of short segments\", "
1203 "%%Proceedings of the 18th International Congress of Phonetic Sciences%, Brighton. ")
1204 MAN_END
1205
1206 }
1207
1208 /* End of file manual_LPC.cpp */