| 1 | /* manual_tutorials.cpp |
| 2 | * |
| 3 | * Copyright (C) 1992-2025 Paul Boersma |
| 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. |
| 13 | * See the GNU 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 | #include "ManPagesM.h" |
| 20 | |
| 21 | void manual_tutorials_init (ManPages me); |
| 22 | void manual_tutorials_init (ManPages me) { |
| 23 | |
| 24 | MAN_PAGES_BEGIN R"~~~( |
| 25 | ################################################################################ |
| 26 | "Praat menu" |
| 27 | © Paul Boersma 2016-12-27 |
| 28 | |
| 29 | The first menu in the @@Objects window@. |
| 30 | In macOS, this menu is in the main menu bar along the top of the screen. |
| 31 | |
| 32 | ################################################################################ |
| 33 | "Analyses menu" |
| 34 | © Paul Boersma 2022-12-02 |
| 35 | |
| 36 | A menu in the @SoundEditor or @TextGridEditor. |
| 37 | |
| 38 | ################################################################################ |
| 39 | "Copy..." |
| 40 | © Paul Boersma 2011-10-18 |
| 41 | |
| 42 | One of the fixed buttons in the @@Objects window@. |
| 43 | |
| 44 | Availability |
| 45 | ============ |
| 46 | |
| 47 | You can choose this command after selecting one object of any type. |
| 48 | |
| 49 | Behaviour |
| 50 | ========= |
| 51 | |
| 52 | The Objects window copies the selected object, and all the data it contains, |
| 53 | to a new object, which will appear at the bottom of the List of Objects. |
| 54 | |
| 55 | Example |
| 56 | ======= |
| 57 | |
| 58 | If you select “Sound hallo” and click ##Copy...#, |
| 59 | a command window will appear, which prompts you for a name; |
| 60 | after you click #OK, a new object will appear in the list, bearing that name. |
| 61 | |
| 62 | ################################################################################ |
| 63 | "Draw menu" |
| 64 | © Paul Boersma 2001-04-17 |
| 65 | |
| 66 | A menu that occurs in the @@Dynamic menu@ for many objects. |
| 67 | |
| 68 | This menu contains commands for drawing the object to the @@Picture window@, |
| 69 | which will allow you to print the drawing or to copy it to your word processor. |
| 70 | |
| 71 | ################################################################################ |
| 72 | "Dynamic menu" |
| 73 | © Paul Boersma 20110131 // 2023-06-08 |
| 74 | |
| 75 | A column of buttons in the right-hand part of the @@Objects window@, |
| 76 | plus the @@Save menu@ in the Objects window. |
| 77 | |
| 78 | If you select one or more @objects in the list, |
| 79 | the possible actions that you can perform with the selected objects |
| 80 | will appear in the dynamic menu. |
| 81 | These actions can include viewing & editing, saving, drawing, |
| 82 | conversions to other types (including analysis and synthesis), and more. |
| 83 | |
| 84 | Example of analysis: |
| 85 | ==================== |
| 86 | |
| 87 | Record a Sound, select it, and click ##To Pitch...#. |
| 88 | This will create a new Pitch object and put it in the list of objects. |
| 89 | You can then edit, write, and draw this Pitch object. |
| 90 | |
| 91 | Example of synthesis: |
| 92 | ===================== |
| 93 | |
| 94 | Create a Speaker, create and edit an Artword, and click ##To Sound...#. |
| 95 | |
| 96 | ################################################################################ |
| 97 | "View & Edit" |
| 98 | © Paul Boersma 2011-01-28 |
| 99 | |
| 100 | A command in the @@Dynamic menu@ of several types of @objects. |
| 101 | |
| 102 | This command puts an @@Editors|editor@ window on the screen, which shows the contents of the selected object. |
| 103 | This window will allow your to view and modify the contents of this object. |
| 104 | |
| 105 | ################################################################################ |
| 106 | "Extract visible formant contour" |
| 107 | © Paul Boersma 2003-03-16 |
| 108 | |
| 109 | One of the commands in the Formant menu of the @SoundEditor and the @TextGridEditor. |
| 110 | |
| 111 | See @@Intro 5. Formant analysis@ |
| 112 | |
| 113 | ################################################################################ |
| 114 | "Extract visible intensity contour" |
| 115 | © Paul Boersma 2003-03-16 |
| 116 | |
| 117 | One of the commands in the Intensity menu of the @SoundEditor and the @TextGridEditor. |
| 118 | |
| 119 | See @@Intro 6. Intensity analysis@ |
| 120 | |
| 121 | ################################################################################ |
| 122 | "Extract visible pitch contour" |
| 123 | © Paul Boersma 2003-03-16 |
| 124 | |
| 125 | One of the commands in the Pitch menu of the @SoundEditor and the @TextGridEditor. |
| 126 | |
| 127 | See @@Intro 4. Pitch analysis@ |
| 128 | |
| 129 | ################################################################################ |
| 130 | "Extract visible spectrogram" |
| 131 | © Paul Boersma 2003-03-16 |
| 132 | |
| 133 | One of the commands in the Spectrogram menu of the @SoundEditor and the @TextGridEditor. |
| 134 | |
| 135 | See @@Intro 3. Spectral analysis@ |
| 136 | |
| 137 | ################################################################################ |
| 138 | "FAQ (Frequently Asked Questions)" |
| 139 | © Paul Boersma 2007-12-10 |
| 140 | |
| 141 | , @@FAQ: How to cite Praat |
| 142 | , @Unicode |
| 143 | , @@FAQ: Formant analysis |
| 144 | , @@FAQ: Pitch analysis |
| 145 | , @@FAQ: Spectrograms |
| 146 | , @@FAQ: Scripts |
| 147 | |
| 148 | // Hardware |
| 149 | // Pitch: octave errors |
| 150 | |
| 151 | ################################################################################ |
| 152 | "FAQ: Formant analysis" |
| 153 | © Paul Boersma 2003-09-16 |
| 154 | |
| 155 | #Problem: I get different formant values if I choose to analyse 3 formants |
| 156 | than if I choose to analyse 4 formants. |
| 157 | |
| 158 | Solution: the “number of formants” in formant analysis determines the |
| 159 | number of peaks with which the %entire spectrum is modelled. For an average |
| 160 | female voice, you should choose to analyse 5 formants in the region up to 5500 Hz, |
| 161 | even if you are interested only in the first three formants. |
| 162 | |
| 163 | #Problem: I often get only 1 formant in a region where I see clearly 2 formants |
| 164 | in the spectrogram. |
| 165 | |
| 166 | This occurs mainly in back vowels (F1 and F2 close together) for male voices, |
| 167 | if the “maximum formant” is set to the standard of 5500 Hz, which is appropriate |
| 168 | for female voices. Set the “maximum formant” down to 5000 Hz. |
| 169 | No, Praat comes without a guarantee: the formant analysis is based on LPC, |
| 170 | and this comes with several assumptions as to what a speech spectrum is like. |
| 171 | |
| 172 | #Question: what algorithm is used for formant analysis? |
| 173 | |
| 174 | Answer: see @@Sound: To Formant (burg)...@. |
| 175 | |
| 176 | ################################################################################ |
| 177 | "FAQ: How to cite Praat" |
| 178 | © Paul Boersma 2005,2010,2014,2025,2026 |
| 179 | |
| 180 | #Question: how do I cite Praat in my articles? |
| 181 | |
| 182 | Answer: nowadays most journals allow you to cite computer programs and web sites. |
| 183 | The style approved by the American Psychological Association, |
| 184 | and therefore by many journals, is like the following |
| 185 | (change the dates and version number as needed): |
| 186 | {- |
| 187 | writeInfoLine: “Paul Boersma, David Weenink & Anastasia Shchupak (”, appYear(), |
| 188 | ... “). Praat: doing phonetics by computer [Computer program]. Version ”, appVersion$(), |
| 189 | ... “, retrieved ”, appDay(), “ ”, appMonth$(), “ ”, appYear(), “ from https://praat.org” |
| 190 | } |
| 191 | If the journal does not allow you to cite a web site, then try: |
| 192 | |
| 193 | Boersma, Paul (2001). Praat, a system for doing phonetics by computer. |
| 194 | %%Glot International% ##5:9/10#, 341-345. |
| 195 | |
| 196 | This paper can be downloaded from Boersma’s website. |
| 197 | |
| 198 | ################################################################################ |
| 199 | "FAQ: Pitch analysis" |
| 200 | © Paul Boersma, 2002,2006,2022-2024 |
| 201 | |
| 202 | Please also consult @@how to choose a pitch analysis method@. |
| 203 | |
| 204 | #Question: what algorithm is used for pitch analysis? |
| 205 | |
| 206 | Answer: for how the raw pitch analysis method works, |
| 207 | see @@Sound: To Pitch (ac)...@. The 1993 article is downloadable from |
| 208 | https://www.fon.hum.uva.nl/paul/ |
| 209 | |
| 210 | #Question: why does Praat consider my sound voiceless while I hear it as voiced? |
| 211 | |
| 212 | There are at least five possibilities. Most of them can be checked by zooming in on the @waveform. |
| 213 | |
| 214 | The first possibility is that the pitch has fallen below the @@pitch floor@. For instance, |
| 215 | your pitch floor could be 50 Hz but the English speaker produces creak at the end of the utterance. |
| 216 | Or your pitch floor could be 50 Hz but the Chinese speaker is in the middle of a third tone. |
| 217 | If this happens, it may help to lower the pitch floor to e.g. 30 Hz (@@Pitch settings...@), |
| 218 | although that may also smooth the pitch curve too much in other places. |
| 219 | |
| 220 | The second possibility is that the pitch has moved too fast. This could happen at the end of a Chinese fourth tone, |
| 221 | which drops very fast. If this happens, it may help to use @@pitch analysis by raw cross-correlation@, |
| 222 | although Praat may then hallucinate pitches in other places that you would prefer to consider voiceless. |
| 223 | |
| 224 | The third possibility is that the periods are very irregular, as in some pathological voices. |
| 225 | If you want to see a pitch in those cases, it may help to use @@pitch analysis by raw cross-correlation@. |
| 226 | Or it may help to lower the ##voicing threshold# setting |
| 227 | to 0.25 (instead of the standard 0.50) or so (@@Pitch settings...@). |
| 228 | |
| 229 | The fourth possibility is that there is a lot of background noise, as in a recording on a busy street. |
| 230 | In such a case, it may help to lower the ##voicing threshold# setting |
| 231 | to 0.25 (instead of the standard 0.50) or so. The disadvantage of lowering this setting is that for non-noisy |
| 232 | recordings, Praat will become too eager to find voicing in some places that you would prefer to consider voiceless; |
| 233 | so make sure to set it back to 0.50 once you have finished analysing the noisy recordings. |
| 234 | |
| 235 | The fifth possibility is that the part analysed as voiceless is much less loud than the rest of the sound, |
| 236 | or that the sound contains a loud noise elsewhere. This can be checked by zooming in on the part analysed as voiceless: |
| 237 | if Praat suddenly considers it as voiced, this is a sign that this part is much quieter than the rest. |
| 238 | To make Praat analyse this part as voiced, you can lower the ##silence threshold# setting to 0.01 |
| 239 | (instead of the standard 0.09) or so. The disadvantage of lowering this setting is that Praat may start to consider |
| 240 | some distant background sounds (and quiet echos, for instance) as voiced. |
| 241 | |
| 242 | #Question: why do I get different results for the maximum pitch if...? |
| 243 | |
| 244 | If you select a Sound and choose @@Sound: To Pitch (filtered ac)...@, the time step will usually |
| 245 | be 0.015 seconds. The resulting @Pitch object will have values for times that are |
| 246 | 0.015 seconds apart. If you then click Info or choose ##Get maximum pitch# from the @@Query submenu@, |
| 247 | the result is based on those time points. By contrast, if you choose ##Get maximum pitch# |
| 248 | from the @@Pitch menu@ in the SoundEditor window, the result will be based on the visible points, |
| 249 | of which there tend to be a hundred in the visible window. These different time spacings will |
| 250 | lead to slightly different pitch contours. |
| 251 | |
| 252 | If you choose ##Move cursor to maximum pitch#, then choose ##Get pitch# from the |
| 253 | @@Pitch menu@, the result will be different again. This is because ##Get maximum pitch# |
| 254 | can do a parabolic interpolation around the maximum, whereas ##Get pitch#, not realizing |
| 255 | that the cursor is at a maximum, does a stupid linear interpolation, which tends to lead to |
| 256 | lower values. |
| 257 | |
| 258 | ################################################################################ |
| 259 | "FAQ: Scripts" |
| 260 | © Paul Boersma 2001,2004,2011,2013,2014,2023 |
| 261 | |
| 262 | #Question: how do I do something to all the files in a directory? |
| 263 | |
| 264 | Answer: look at @`fileNames$#` () or @@Create Strings as file list...@. |
| 265 | , |
| 266 | |
| 267 | #Question: why doesn't the editor window react to my commands? |
| 268 | |
| 269 | Your commands are probably something like: |
| 270 | {; |
| 271 | Read from file: “hello.wav” |
| 272 | View & Edit |
| 273 | Zoom: 0.3, 0.5 |
| 274 | } |
| 275 | |
| 276 | Answer: Praat doesn’t know it has to send the #Zoom command to the editor |
| 277 | window called ##14. Sound hello#. There could be several Sound editor windows on your |
| 278 | screen. According to @@Scripting 7.1. Scripting an editor from a shell script@, |
| 279 | you will have to say this explicitly: |
| 280 | {; |
| 281 | Read from file: “hello.wav” |
| 282 | View & Edit |
| 283 | editor: “Sound hello” |
| 284 | Zoom: 0.3, 0.5 |
| 285 | } |
| 286 | , |
| 287 | |
| 288 | #Problem: a line like “%`Number = 1`” does not work. |
| 289 | |
| 290 | Solution: names of variables should start with a lower-case letter. |
| 291 | , |
| 292 | |
| 293 | #Question: why do names of variables have to start with a lower-case letter? |
| 294 | I would like to do things like “`F0 = Get mean pitch`”. |
| 295 | |
| 296 | Answer: Praat scripts combine button commands with things that only occur |
| 297 | in scripts. Button commands always start with a capital letter, e.g. `Play` (there is a button #Play). |
| 298 | Script commands always start with lower case, e.g. `writeInfoLine: “Hello”` |
| 299 | ($writeInfoLine is a built-in function). |
| 300 | A minimal pair is “$select”, which simulates a mouse click in the object list, |
| 301 | versus “`Select...`”, which sets the selection in editor windows. If we allowed initial capitals, |
| 302 | variable names would become rather ambiguous in assignments, |
| 303 | as in “`x = Get`”, where “%`Get`” would be a variable, versus “`x = Get mean`”, |
| 304 | where ##Get mean# is a button command. To prevent this confusion, Praat enforces |
| 305 | a rigorous lower-case/upper-case distinction. |
| 306 | , |
| 307 | |
| 308 | #Question: how do I convert a number into a string? |
| 309 | |
| 310 | Answer: `a$ = string$ (a)` |
| 311 | |
| 312 | #Question: how do I convert a string into a number? |
| 313 | |
| 314 | Answer: `a = number (a$)` |
| 315 | |
| 316 | ################################################################################ |
| 317 | "FAQ: Spectrograms" |
| 318 | © Paul Boersma 2002,2003 |
| 319 | |
| 320 | #Problem: the background is grey instead of white (too little contrast) |
| 321 | |
| 322 | Solution: reduce the ##Dynamic range# in the spectrogram settings. The standard value is 50 dB, |
| 323 | which is fine for detecting small things like plosive voicing in well recorded speech. |
| 324 | For gross features like vowel formants, or for noisy speech, you may want to change the dynamic range |
| 325 | to 40 or even 30 dB. |
| 326 | |
| 327 | ################################################################################ |
| 328 | "File menu" |
| 329 | © Paul Boersma 2002 |
| 330 | |
| 331 | One of the menus in all @editors, in the @manual, and in the @@Picture window@. |
| 332 | |
| 333 | ################################################################################ |
| 334 | "Filtering" |
| 335 | © Paul Boersma 2001,2003,2008,2010 |
| 336 | |
| 337 | This tutorial describes the use of filtering techniques in Praat. |
| 338 | It assumes you are familiar with the @Intro. |
| 339 | |
| 340 | Frequency-domain filtering |
| 341 | ========================== |
| 342 | |
| 343 | Modern computer techniques make possible an especially simple batch filtering method: |
| 344 | multiplying the complex spectrum in the frequency domain by any real-valued filter function. |
| 345 | This leads to a zero phase shift for each frequency component. The impulse response is symmetric |
| 346 | in the time domain, which also means that the filter is %acausal: the filtered signal will show components |
| 347 | before they start in the original. |
| 348 | |
| 349 | - @@Spectrum: Filter (pass Hann band)...@ |
| 350 | - @@Spectrum: Filter (stop Hann band)...@ |
| 351 | - @@Sound: Filter (pass Hann band)...@ |
| 352 | - @@Sound: Filter (stop Hann band)...@ |
| 353 | - @@Sound: Filter (formula)...@ |
| 354 | |
| 355 | Spectro-temporal: |
| 356 | |
| 357 | - @@band filtering in the frequency domain@ |
| 358 | |
| 359 | Fast time-domain filtering |
| 360 | ========================== |
| 361 | |
| 362 | Some very fast Infinite Impulse Response (IIR) filters can be defined in the time domain. |
| 363 | These include recursive all-pole filters and pre-emphasis. These filters are causal but have non-zero phase shifts. |
| 364 | There are versions that create new Sound objects: |
| 365 | |
| 366 | - @@Sound: Filter (one formant)...@ |
| 367 | - @@Sound: Filter (pre-emphasis)...@ |
| 368 | - @@Sound: Filter (de-emphasis)...@ |
| 369 | |
| 370 | And there are in-place versions, which modify the existing Sound objects: |
| 371 | |
| 372 | - @@Sound: Filter with one formant (in-place)...@ |
| 373 | - @@Sound: Pre-emphasize (in-place)...@ |
| 374 | - @@Sound: De-emphasize (in-place)...@ |
| 375 | |
| 376 | Convolution |
| 377 | =========== |
| 378 | |
| 379 | A Finite Impulse Response (FIR) filter can be described as a sampled sound. |
| 380 | Filtering with such a filter amounts to a %#convolution of the original sound and the filter: |
| 381 | |
| 382 | - @@Sounds: Convolve...@ |
| 383 | |
| 384 | Described elsewhere |
| 385 | =================== |
| 386 | |
| 387 | Described in the @@Source-filter synthesis@ tutorial: |
| 388 | |
| 389 | - @@Sound & Formant: Filter@ |
| 390 | - @@Sound & FormantGrid: Filter@ |
| 391 | - @@LPC & Sound: Filter...@ |
| 392 | - @@LPC & Sound: Filter (inverse)@ |
| 393 | |
| 394 | ################################################################################ |
| 395 | "Formants menu" |
| 396 | © Paul Boersma 2022 |
| 397 | |
| 398 | A menu in the @SoundEditor or @TextGridEditor. |
| 399 | |
| 400 | ################################################################################ |
| 401 | "Formants & LPC menu" |
| 402 | © Paul Boersma 2001 |
| 403 | |
| 404 | A menu that occurs in the @@Dynamic menu@ for a @Sound. |
| 405 | |
| 406 | This menu contains commands for analysing the formant contours of the selected Sound: |
| 407 | |
| 408 | , @@Sound: To Formant (burg)... |
| 409 | , @@Sound: To Formant (keep all)... |
| 410 | , @@Sound: To Formant (sl)... |
| 411 | , @@Sound: To LPC (autocorrelation)... |
| 412 | , @@Sound: To LPC (covariance)... |
| 413 | , @@Sound: To LPC (burg)... |
| 414 | , @@Sound: To LPC (marple)... |
| 415 | , @@Sound: To MFCC... |
| 416 | |
| 417 | ################################################################################ |
| 418 | "Get first formant" |
| 419 | © Paul Boersma 2001,2022 |
| 420 | |
| 421 | One of the query commands in the @@Formants menu@ of the @SoundEditor and the @TextGridEditor. |
| 422 | |
| 423 | ################################################################################ |
| 424 | "Get pitch" |
| 425 | © Paul Boersma 2001,2022 |
| 426 | |
| 427 | One of the query commands in the @@Pitch menu@ of the @SoundEditor and the @TextGridEditor. |
| 428 | |
| 429 | ################################################################################ |
| 430 | "Get second formant" |
| 431 | © Paul Boersma 2001,2022 |
| 432 | |
| 433 | One of the query commands in the @@Formants menu@ of the @SoundEditor and the @TextGridEditor. |
| 434 | |
| 435 | ################################################################################ |
| 436 | "Goodies" |
| 437 | © Paul Boersma 2002,2005 |
| 438 | |
| 439 | The title of a submenu of the @@Praat menu@. |
| 440 | |
| 441 | ################################################################################ |
| 442 | "Info" |
| 443 | © Paul Boersma 1996,1998 |
| 444 | |
| 445 | One of the fixed buttons in the @@Objects window@. |
| 446 | |
| 447 | Availability |
| 448 | ============ |
| 449 | |
| 450 | You can choose this command after choosing one object. |
| 451 | |
| 452 | Purpose |
| 453 | ======= |
| 454 | |
| 455 | To get some information about the selected object. |
| 456 | |
| 457 | Behaviour |
| 458 | ========= |
| 459 | |
| 460 | The information will appear in the @@Info window@. |
| 461 | |
| 462 | ################################################################################ |
| 463 | "Info window" |
| 464 | © Paul Boersma 1997,1998,2003,2023 |
| 465 | |
| 466 | A text window into which many query commands write their answers. |
| 467 | |
| 468 | You can select text from this window and copy it to other places. |
| 469 | |
| 470 | In a @@Praat script@, you can bypass the Info window by having a query command |
| 471 | writing directly into a script variable. |
| 472 | |
| 473 | Apart from the @Info command, which writes general information about the selected object, |
| 474 | most commands in any @@Query submenu@ also write into the Info window. |
| 475 | |
| 476 | ################################################################################ |
| 477 | "Inspect" |
| 478 | © Paul Boersma 1996 |
| 479 | |
| 480 | One of the fixed buttons in the @@Objects window@. |
| 481 | |
| 482 | You can use this command after selecting one object in the list. |
| 483 | |
| 484 | The contents of the selected object will become visible in a Data Editor. |
| 485 | You can then view and change the data in the object, |
| 486 | but beware: changing the data directly in this way may render them inconsistent. |
| 487 | |
| 488 | Changes that you make to the data with another Editor (e.g., a SoundEditor), |
| 489 | or with the commands under #Modify, |
| 490 | are immediately reflected in the top-level Data Editor; |
| 491 | any subeditors are destroyed, however, because they may now refer to invalid data. |
| 492 | |
| 493 | Changes that you make to the data with a Data Editor, |
| 494 | are immediately reflected in any open type-specific Editors (e.g., a SoundEditor). |
| 495 | |
| 496 | ################################################################################ |
| 497 | "Intro" |
| 498 | © Paul Boersma 2003,2004,2007,2009,2011,2025 |
| 499 | |
| 500 | This is an introductory tutorial to Praat, a computer program |
| 501 | with which you can analyse, synthesize, and manipulate speech, |
| 502 | and create high-quality pictures for your articles and thesis. |
| 503 | You are advised to work through all of this tutorial. |
| 504 | |
| 505 | You can read this tutorial sequentially with the help of the “##1 >#” and “##< 1#” buttons, |
| 506 | or go to the desired information by clicking on the blue links. |
| 507 | |
| 508 | , @@Intro 1. How to get a sound@: |
| 509 | @@Intro 1.1. Recording a sound|record@, |
| 510 | @@Intro 1.2. Reading a sound from disk|read@, |
| 511 | @@Intro 1.3. Creating a sound from a formula|formula@. |
| 512 | , @@Intro 2. What to do with a sound@: |
| 513 | @@Intro 2.1. Saving a sound to disk|write@, |
| 514 | @@Intro 2.2. Viewing and editing a sound|view@. |
| 515 | , @@Intro 3. Spectral analysis |
| 516 | , spectrograms: @@Intro 3.1. Viewing a spectrogram|view@, |
| 517 | @@Intro 3.2. Configuring the spectrogram|configure@, |
| 518 | @@Intro 3.3. Querying the spectrogram|query@, |
| 519 | @@Intro 3.4. Printing the spectrogram|print@, |
| 520 | @@Intro 3.5. The Spectrogram object|the Spectrogram object@. |
| 521 | , spectral slices: @@Intro 3.6. Viewing a spectral slice|view@, |
| 522 | @@Intro 3.7. Configuring the spectral slice|configure@, |
| 523 | @@Intro 3.8. The Spectrum object|the Spectrum object@. |
| 524 | , @@Intro 4. Pitch analysis |
| 525 | , pitch contours: @@Intro 4.1. Viewing a pitch contour|view@, |
| 526 | @@Intro 4.2. Configuring the pitch contour|configure@, |
| 527 | @@Intro 4.3. Querying the pitch contour|query@, |
| 528 | @@Intro 4.4. Printing the pitch contour|print@, |
| 529 | @@Intro 4.5. The Pitch object|the Pitch object@. |
| 530 | , @@Intro 5. Formant analysis |
| 531 | , formant contours: @@Intro 5.1. Viewing formant contours|view@, |
| 532 | @@Intro 5.2. Configuring the formant contours|configure@, |
| 533 | @@Intro 5.3. Querying the formant contours|query@, |
| 534 | @@Intro 5.4. The Formant object|the Formant object@. |
| 535 | , @@Intro 6. Intensity analysis |
| 536 | , intensity contours: @@Intro 6.1. Viewing an intensity contour|view@, |
| 537 | @@Intro 6.2. Configuring the intensity contour|configure@, |
| 538 | @@Intro 6.3. Querying the intensity contour|query@, |
| 539 | @@Intro 6.4. The Intensity object|the Intensity object@. |
| 540 | , @@Intro 7. Annotation |
| 541 | , @@Intro 8. Manipulation@: of |
| 542 | @@Intro 8.1. Manipulation of pitch|pitch@, |
| 543 | @@Intro 8.2. Manipulation of duration|duration@, |
| 544 | @@Intro 8.3. Manipulation of intensity|intensity@, |
| 545 | @@Intro 8.4. Manipulation of formants|formants@. |
| 546 | |
| 547 | There are also more specialized tutorials: |
| 548 | , Phonetics: |
| 549 | • Voice analysis (jitter, shimmer, noise): @Voice |
| 550 | • Listening experiments: @@ExperimentMFC@ |
| 551 | • @@Sound files@ |
| 552 | • @@Filtering@ |
| 553 | • @@Source-filter synthesis@ |
| 554 | • @@Articulatory synthesis@ |
| 555 | , Learning: |
| 556 | • @@Feedforward neural networks@ |
| 557 | • @@OT learning@ |
| 558 | , Statistics: |
| 559 | • @@Principal component analysis@ |
| 560 | • @@Multidimensional scaling@ |
| 561 | • @@Discriminant analysis@ |
| 562 | , General: |
| 563 | • @@Scripting@ |
| 564 | • @@Demo window@ |
| 565 | • @@Printing@ |
| 566 | |
| 567 | The authors |
| 568 | =========== |
| 569 | |
| 570 | The Praat program was created by Paul Boersma and David Weenink of |
| 571 | the Institute of Phonetics Sciences of the University of Amsterdam. |
| 572 | Home page: #`https://praat.org` or #`https://www.fon.hum.uva.nl/praat`. |
| 573 | |
| 574 | For questions and suggestions, mail to the Praat discussion list, |
| 575 | which is reachable from the Praat home page, or directly to #`[email protected]`. |
| 576 | |
| 577 | ################################################################################ |
| 578 | )~~~" |
| 579 | MAN_PAGES_END |
| 580 | |
| 581 | MAN_BEGIN (U"Intro 1. How to get a sound", U"ppgb", 20021212) |
| 582 | INTRO (U"Most of the things most people do with Praat start with a sound. " |
| 583 | "There are at least three ways to get a sound:") |
| 584 | LIST_ITEM (U"@@Intro 1.1. Recording a sound") |
| 585 | LIST_ITEM (U"@@Intro 1.2. Reading a sound from disk") |
| 586 | LIST_ITEM (U"@@Intro 1.3. Creating a sound from a formula") |
| 587 | MAN_END |
| 588 | |
| 589 | MAN_BEGIN (U"Intro 1.1. Recording a sound", U"ppgb", 20201120) |
| 590 | INTRO (U"To record a speech sound into Praat, you need a computer with a microphone.") |
| 591 | NORMAL (U"To record from the microphone, perform the following steps:") |
| 592 | LIST_ITEM (U"1. Choose @@Record mono Sound...@ from the @@New menu@ in the @@Objects window@. " |
| 593 | "A @SoundRecorder window will appear on your screen.") |
| 594 | LIST_ITEM (U"2. On the left in the SoundRecorder window, choose the appropriate input device, e.g. choose ##Internal microphone#. " |
| 595 | "(On Windows, instead right-click the loudspeaker symbol in the Start bar; see @SoundRecorder for more details.)") |
| 596 | LIST_ITEM (U"3. Use the #Record and #Stop buttons to record a few seconds of your speech.") |
| 597 | LIST_ITEM (U"4. Use the #Play button to hear what you have recorded.") |
| 598 | LIST_ITEM (U"5. Repeat steps 3 and 4 until you are satisfied with your recording.") |
| 599 | LIST_ITEM (U"6. Click the ##Save to list# button. Your recording will now appear in the Objects window, " |
| 600 | "where it will be called “Sound sound”.") |
| 601 | LIST_ITEM (U"7. You can now close the SoundRecorder window.") |
| 602 | LIST_ITEM (U"8. When you saved your sound to the Objects window, some buttons appeared in that window. " |
| 603 | "These buttons show you what you can do with the sound. Try the #Play and @@View & Edit@ buttons.") |
| 604 | NORMAL (U"For more information on recording, see the @SoundRecorder manual page.") |
| 605 | MAN_END |
| 606 | |
| 607 | MAN_BEGIN (U"Intro 1.2. Reading a sound from disk", U"ppgb", 20041126) |
| 608 | INTRO (U"Apart from recording a new sound from a microphone, you could read an existing sound file from your disk.") |
| 609 | NORMAL (U"With @@Read from file...@ from the @@Open menu@, " |
| 610 | "Praat will be able to read most standard types of sound files, e.g. WAV files. " |
| 611 | "They will appear as @Sound objects in the Objects window. For instance, if you open the file ##hello.wav#, " |
| 612 | "an object called “Sound hello” will appear in the list.") |
| 613 | NORMAL (U"If you do not have a sound file on your disk, you can download a WAV file (or so) from the Internet, " |
| 614 | "then read that file into Praat with ##Read from file...#.") |
| 615 | MAN_END |
| 616 | |
| 617 | MAN_BEGIN (U"Intro 1.3. Creating a sound from a formula", U"ppgb", 20070225) |
| 618 | INTRO (U"If you have no microphone, no sound files on disk, and no access to the Internet, " |
| 619 | "you could still create a sound with @@Create Sound from formula...@ from the @@New menu@.") |
| 620 | MAN_END |
| 621 | |
| 622 | MAN_BEGIN (U"Intro 2. What to do with a sound", U"ppgb", 20110131) |
| 623 | INTRO (U"As soon as you have a @Sound in the @@List of Objects@, " |
| 624 | "the buttons in the @@Dynamic menu@ (the right-hand part of the @@Objects window@) " |
| 625 | "will show you what you can do with it.") |
| 626 | LIST_ITEM (U"@@Intro 2.1. Saving a sound to disk") |
| 627 | LIST_ITEM (U"@@Intro 2.2. Viewing and editing a sound") |
| 628 | MAN_END |
| 629 | |
| 630 | MAN_BEGIN (U"Intro 2.1. Saving a sound to disk", U"ppgb", 20110131) |
| 631 | INTRO (U"There are several ways to write a sound to disk.") |
| 632 | NORMAL (U"First, the @@File menu@ of the @SoundRecorder window contains commands to save the left " |
| 633 | "channel, the right channel, or both channels of the recorded sound to any of four standard types " |
| 634 | "of sound files (WAV, AIFC, NeXT/Sun, NIST). These four file types are all equally good for Praat: " |
| 635 | "Praat will handle them equally well on every computer. The first three of these types will " |
| 636 | "also be recognized by nearly all other sound-playing programs.") |
| 637 | NORMAL (U"Then, once you have a @Sound object in the @@List of Objects@, " |
| 638 | "you can save it in several formats with the commands in the @@Save menu@. " |
| 639 | "Again, the WAV, AIFF, AIFC, NeXT/Sun, and NIST formats are equally fine.") |
| 640 | NORMAL (U"For more information, see the @@Sound files@ tutorial.") |
| 641 | MAN_END |
| 642 | |
| 643 | MAN_BEGIN (U"Intro 2.2. Viewing and editing a sound", U"ppgb", 20230202) // 2023-06-08 |
| 644 | NORMAL (U"To see the wave form of a @Sound that is in the list of objects, " |
| 645 | "select that Sound and click @@View & Edit@. A @SoundEditor window will appear on your screen. " |
| 646 | "You see a waveform (or two waveforms, if you have a stereo sound) and probably some “analyses” below it. " |
| 647 | "You can zoom in and scroll to see the various parts of the sound in detail. " |
| 648 | "You can select a part of the sound by dragging with the mouse. " |
| 649 | "To play a part of the sound, click in any of the rectangles below it. " |
| 650 | "To move a selected part of the sound to another location, use #Cut and #Paste from the Edit menu. " |
| 651 | "You can open sound windows for more than one sound, and then cut, copy, and paste between the sounds, " |
| 652 | "just as you are used to doing with text and pictures in word processing programs.") |
| 653 | NORMAL (U"If your sound file is longer than a couple of minutes, " |
| 654 | "or if you want to see and listen to both channels of a stereo sound, " |
| 655 | "you may prefer to open it with @@Open long sound file...@. " |
| 656 | "This puts a @LongSound object into the list. In this way, most of the sound will stay in the file on disk, " |
| 657 | "and at most 60 seconds will be read into memory each time you play or view a part of it. " |
| 658 | "To change these 60 seconds to something else, e.g. 500 seconds, " |
| 659 | "choose ##LongSound settings...# from the #Settings submenu of the Praat menu.") |
| 660 | MAN_END |
| 661 | |
| 662 | MAN_BEGIN (U"Intro 3. Spectral analysis", U"ppgb", 20070905) |
| 663 | INTRO (U"This section describes how you can analyse the spectral content of an existing sound. " |
| 664 | "You will learn how to use %spectrograms and %%spectral slices%.") |
| 665 | LIST_ITEM (U"@@Intro 3.1. Viewing a spectrogram") |
| 666 | LIST_ITEM (U"@@Intro 3.2. Configuring the spectrogram") |
| 667 | LIST_ITEM (U"@@Intro 3.3. Querying the spectrogram") |
| 668 | LIST_ITEM (U"@@Intro 3.4. Printing the spectrogram") |
| 669 | LIST_ITEM (U"@@Intro 3.5. The Spectrogram object") |
| 670 | LIST_ITEM (U"@@Intro 3.6. Viewing a spectral slice") |
| 671 | LIST_ITEM (U"@@Intro 3.7. Configuring the spectral slice") |
| 672 | LIST_ITEM (U"@@Intro 3.8. The Spectrum object") |
| 673 | MAN_END |
| 674 | |
| 675 | MAN_BEGIN (U"Intro 3.1. Viewing a spectrogram", U"ppgb", 20110128) // 2023-06-08 |
| 676 | INTRO (U"To see the spectral content of a sound as a function of time, " |
| 677 | "select a @Sound or @LongSound object and choose @@View & Edit@. " |
| 678 | "A @SoundEditor or @LongSoundEditor window will appear on your screen. " |
| 679 | "In the entire bottom half of this window you will see a greyish image, which is called a %spectrogram. " |
| 680 | "If you do not see it, choose @@Show spectrogram@ from the Spectrogram menu.") |
| 681 | NORMAL (U"The spectrogram is a @@spectro-temporal representation@ of the sound. " |
| 682 | "The horizontal direction of the spectrogram represents @time, the vertical direction represents @frequency. " |
| 683 | "The time scale of the spectrogram is the same as that of the waveform, so the spectrogram reacts " |
| 684 | "to your zooming and scrolling. " |
| 685 | "To the left of the spectrogram, you see the frequency scale. The frequency at the bottom of the spectrogram " |
| 686 | "is usually 0 Hz (hertz, cps, cycles per second), and a common value for the frequency at the top is 5000 Hz.") |
| 687 | NORMAL (U"Darker parts of the spectrogram mean higher energy densities, lighter parts mean lower energy densities. " |
| 688 | "If the spectrogram has a dark area around a time of 1.2 seconds and a frequency of 4000 Hz, " |
| 689 | "this means that the sound has lots of energy for those high frequencies at that time. " |
| 690 | "For many examples of spectrograms of speech sounds, see the textbook by @@Ladefoged (2001)@ and " |
| 691 | "the reference work by @@Ladefoged & Maddieson (1996)@.") |
| 692 | NORMAL (U"To see what time and frequency a certain part of the spectrogram is associated with, " |
| 693 | "just click in the spectrogram and you will see the vertical time cursor showing the time above " |
| 694 | "the waveform and the horizontal frequency cursor showing the frequency to the left of the spectrogram. " |
| 695 | "This is one of the ways to find the %formant frequencies for vowels, or the main spectral peaks " |
| 696 | "for fricatives.") |
| 697 | ENTRY (U"Hey, there are white vertical stripes at the edges!") |
| 698 | NORMAL (U"This is normal. Spectral analysis requires an %%analysis window% of a certain duration. " |
| 699 | "For instance, if Praat wants to know the spectrum at 1.342 seconds, it needs to include information " |
| 700 | "about the signal in a 10-milliseconds window around this time point, i.e., Praat will use " |
| 701 | "signal information about all times between 1.337 and 1.347 seconds. At the very edges of the sound, " |
| 702 | "this information is not available: " |
| 703 | "if the sound runs from 0 to 1.8 seconds, no spectrum can be computed between 0 and 0.005 " |
| 704 | "seconds or between 1.795 and 1.800 seconds. Hence the white stripes. If you do not see them " |
| 705 | "immediately when you open the sound, zoom in on the beginning or end of the sound.") |
| 706 | NORMAL (U"When you zoom in on the middle of the sound (or anywhere not near the edges), the white stripes vanish. " |
| 707 | "Suddenly you see only the time stretch between 0.45 and 1.35 seconds, for instance. " |
| 708 | "But Praat did not forget what the signal looks like just outside the edges of this time window. " |
| 709 | "To display a spectrogram from 0.45 to 1.35 seconds, Praat will use information from the wave form " |
| 710 | "between 0.445 and 1.355 seconds, and if this is available, you will see no white stripes at the edges of the window.") |
| 711 | ENTRY (U"Hey, it changes when I scroll!") |
| 712 | NORMAL (U"This is normal as well, especially for long windows. If your visible time window is 20 seconds long, " |
| 713 | "and the window takes up 1000 screen pixels horizontally, " |
| 714 | "then you might think that every one-pixel-wide vertical line should represent the spectrum of 20 milliseconds of sound. " |
| 715 | "But for reasons of computation speed, Praat will only show the spectrum of the part of the sound " |
| 716 | "that lies around the centre of those 20 milliseconds, " |
| 717 | "not the average or sum of all the spectra in those 20 milliseconds. " |
| 718 | "This %undersampling of the underlying spectrogram is different from what happens in the drawing of the wave form, " |
| 719 | "where a vertical black line connects the minimum and maximum amplitude of all the samples that fall inside a " |
| 720 | "screen pixel. We cannot do something similar for spectrograms. And since scrolling goes by fixed time steps " |
| 721 | "(namely, 5 percent of the duration of the visible window), rather than by a whole number of screen pixels, " |
| 722 | "the centres of the pixels will fall in different parts of the spectrogram with each scroll. " |
| 723 | "Hence the apparent changes. If your visible window is shorter than a couple of seconds, " |
| 724 | "the scrolling spectrogram will appear much smoother.") |
| 725 | NORMAL (U"The darkness of the spectrogram will also change when you scroll, because the visible part with the most " |
| 726 | "energy is defined as black. When a very energetic part of the signal scrolls out of view, the spectrogram " |
| 727 | "will turn darker. The next section will describe a way to switch this off.") |
| 728 | MAN_END |
| 729 | |
| 730 | MAN_BEGIN (U"Intro 3.2. Configuring the spectrogram", U"ppgb", 20220907) |
| 731 | NORMAL (U"With @@Spectrogram settings...@ from the #Spectrogram menu, " |
| 732 | "you can determine how the spectrogram is computed and how it is displayed. " |
| 733 | "These settings will be remembered across Praat sessions. " |
| 734 | "All these settings have standard values (\"factory settings\"), which appear " |
| 735 | "when you click ##Standards#.") |
| 736 | TERM (U"%%View range% (Hz)") |
| 737 | DEFINITION (U"the range of frequencies to display. The standard is 0 Hz at the bottom and 5000 Hz at the top. " |
| 738 | "If this maximum frequency is higher than the Nyquist frequency of the Sound " |
| 739 | "(which is half its sampling frequency), some values in the spectrogram will be zero, and the higher " |
| 740 | "frequencies will be drawn in white. You can see this if you record a Sound at 44100 Hz and set the " |
| 741 | "view range from 0 Hz to 25000 Hz.") |
| 742 | TERM (U"%%Window length") |
| 743 | DEFINITION (U"the duration of the analysis window. If this is 0.005 seconds (the standard), " |
| 744 | "Praat uses for each frame the part of the sound that lies between 0.0025 seconds before " |
| 745 | "and 0.0025 seconds after the centre of that frame " |
| 746 | "(for Gaussian windows, Praat actually uses a bit more than that). " |
| 747 | "The window length determines the %bandwidth of the spectral analysis, " |
| 748 | "i.e. the width of the horizontal line in the spectrogram of a pure sine wave (see below). " |
| 749 | "For a Gaussian window, the -3 dB bandwidth is 2*sqrt(6*ln(2))/(\\pi*%%Window length%), " |
| 750 | "or 1.2982804 / %%Window length%. " |
| 751 | "To get a “broad-band” spectrogram (bandwidth 260 Hz), keep the standard window length of 5 ms; " |
| 752 | "to get a “narrow-band” spectrogram (bandwidth 43 Hz), set it to 30 ms (0.03 seconds). " |
| 753 | "The other window shapes give slightly different values.") |
| 754 | TERM (U"%%Dynamic range% (dB)") |
| 755 | DEFINITION (U"All values that are more than %%Dynamic range% dB below the maximum (perhaps after dynamic compression, " |
| 756 | "see @@Advanced spectrogram settings...@) " |
| 757 | "will be drawn in white. Values in-between have appropriate shades of grey. Thus, if the highest " |
| 758 | "peak in the spectrogram has a height of 30 dB/Hz, and the dynamic range is 50 dB (which is the standard value), " |
| 759 | "then values below -20 dB/Hz will be drawn in white, and values between -20 dB/Hz and 30 dB/Hz will be drawn " |
| 760 | "in various shades of grey.") |
| 761 | ENTRY (U"The bandwidth") |
| 762 | NORMAL (U"To see how the window length influences the bandwidth, " |
| 763 | "first create a 1000-Hz sine wave with @@Create Sound from formula...@ " |
| 764 | "by typing `1/2 * sin (2*pi*1000*x)` as the formula, then click ##View & Edit#. " |
| 765 | "The spectrogram will show a horizontal black line. " |
| 766 | "You can now vary the window length in the spectrogram settings and see how the thickness " |
| 767 | "of the lines varies. The line gets thinner if you raise the window length. " |
| 768 | "Apparently, if the analysis window comprises more periods of the wave, " |
| 769 | "the spectrogram can tell us the frequency of the wave with greater precision.") |
| 770 | NORMAL (U"To see this more precisely, create a sum of two sine waves, with frequencies of 1000 and 1200 Hz. " |
| 771 | "the formula is `1/4 * sin (2*pi*1000*x) + 1/4 * sin (2*pi*1200*x)`. In the editor, you will see " |
| 772 | "a single thick band if the analysis window is short (5 ms), and two separate bands if the analysis " |
| 773 | "window is long (30 ms). Apparently, the frequency resolution gets better with longer analysis windows.") |
| 774 | NORMAL (U"So why don't we always use long analysis windows? The answer is that their time resolution is poor. " |
| 775 | "To see this, create a sound that consists of two sine waves and two short clicks. The formula is " |
| 776 | "`0.02*(sin(2*pi*1000*x)+sin(2*pi*1200*x)) + (col=10000)+(col=10200)`. " |
| 777 | "If you view this sound, you can see that the two clicks will overlap " |
| 778 | "in time if the analysis window is long, and that the sine waves overlap in frequency if the " |
| 779 | "analysis window is short. Apparently, there is a trade-off between time resolution and " |
| 780 | "frequency resolution. One cannot know both the time and the frequency with great precision.") |
| 781 | ENTRY (U"Advanced settings") |
| 782 | NORMAL (U"The Spectrogram menu also contains @@Advanced spectrogram settings...@.") |
| 783 | MAN_END |
| 784 | |
| 785 | MAN_BEGIN (U"Advanced spectrogram settings...", U"ppgb", 20120531) |
| 786 | ENTRY (U"Optimization") |
| 787 | TERM (U"%%Number of time steps%") |
| 788 | DEFINITION (U"the maximum number of points along the time window for which Praat has to compute " |
| 789 | "the spectrum. If your screen is not wider than 1200 pixels, then the standard of 1000 is " |
| 790 | "appropriate, since there is no point in computing more than one spectrum per one-pixel-wide vertical line. " |
| 791 | "If you have a really wide screen, you may see improvement if you raise this number to 1500.") |
| 792 | TERM (U"%%Number of frequency steps%") |
| 793 | DEFINITION (U"the maximum number of points along the frequency axis for which Praat has to compute " |
| 794 | "the spectrum. If your screen is not taller than 768 pixels, then the standard of 250 is " |
| 795 | "appropriate, since there is no point in computing more than one spectrum per one-pixel-height horizontal line. " |
| 796 | "If you have a really tall screen, you may see improvement if you raise this number.") |
| 797 | NORMAL (U"For purposes of computation speed, Praat may decide to change the time step and the frequency step. " |
| 798 | "This is because the time step never needs to be smaller than 1/(8\\Vr\\pi) of the window length, " |
| 799 | "and the frequency step never needs to be smaller than (\\Vr\\pi)/8 of the inverse of the window length. " |
| 800 | "For instance, if the window length is 5 ms, " |
| 801 | "the actual time step will never be less than 5/(8\\Vr\\pi) = 0.353 ms, " |
| 802 | "and the actual frequency step will never be less than (\\Vr\\pi)/8/0.005 = 44.31 Hz.") |
| 803 | ENTRY (U"Spectrogram analysis settings") |
| 804 | TERM (U"%%Method") |
| 805 | DEFINITION (U"there is currently only one method available in this window for computing a spectrum from " |
| 806 | "a sound: the Fourier transform.") |
| 807 | TERM (U"%%Window shape") |
| 808 | DEFINITION (U"the shape of the analysis window. To compute the spectrum at, say, 3.850 seconds, " |
| 809 | "samples that lie close to 3.850 seconds are given more weight than samples further away. " |
| 810 | "The relative extent to which each sample contributes to the spectrum is given by the window shape. " |
| 811 | "You can choose from: Gaussian, Square (none, rectangular), Hamming (raised sine-squared), " |
| 812 | "Bartlett (triangular), Welch (parabolic), and Hanning (sine-squared). " |
| 813 | "The Gaussian window is superior, as it gives no %sidelobes in your spectrogram (see below); " |
| 814 | "it analyzes a factor of 2 slower than the other window shapes, " |
| 815 | "because the analysis is actually performed on twice as many samples per frame.") |
| 816 | ENTRY (U"Sidelobes; anybody wants to win a cake?") |
| 817 | NORMAL (U"The Gaussian window is the only shape that we can consider seriously as a candidate for " |
| 818 | "the analysis window. To see this, create a 1000-Hz sine wave with @@Create Sound from formula...@ " |
| 819 | "by typing `1/2 * sin (2*pi*1000*x)` as the formula, then click ##View & Edit#. " |
| 820 | "If the window shape is Gaussian, the spectrogram will show a horizontal black line. " |
| 821 | "If the window shape is anything else, the spectrogram will show many horizontal grey lines (%sidelobes), " |
| 822 | "which do not represent anything that is available in the signal. They are artifacts of the " |
| 823 | "window shapes.") |
| 824 | NORMAL (U"We include these other window shapes only for pedagogical purposes " |
| 825 | "and because the Hanning and Hamming windows have traditionally been used in other programs before " |
| 826 | "computers were as fast as they are now (a spectrogram is computed twice as fast " |
| 827 | "with these other windows). Several other programs still use these inferior window shapes, and you are " |
| 828 | "likely to run into people who claim that the Gaussian window has disadvantages. " |
| 829 | "We promise such people a large cake if they can come up with sounds that look better " |
| 830 | "with Hanning or Hamming windows than with a Gaussian window. An example of the reverse is easy " |
| 831 | "to find; we have just seen one.") |
| 832 | ENTRY (U"Spectrogram blackness settings") |
| 833 | TERM (U"%%Autoscaling%") |
| 834 | TERM (U"%%Maximum% (dB/Hz)") |
| 835 | DEFINITION (U"all parts of the spectrogram that have a power above %maximum (after preemphasis) " |
| 836 | "will be drawn in black. The standard maximum is 100 dB/Hz, but if %autoscaling is on (which is the standard), " |
| 837 | "Praat will use the maximum of the visible part of the spectrogram instead; " |
| 838 | "this ensures that the window will always look well, but it also means that the blackness " |
| 839 | "of a certain part of the spectrogram will change as you scroll.") |
| 840 | TERM (U"%%Preemphasis% (dB/octave)") |
| 841 | DEFINITION (U"determines the steepness of a high-pass filter, " |
| 842 | "i.e., how much the power of higher frequencies will be raised before drawing, as compared to lower frequencies. " |
| 843 | "Since the spectral slope of human vowels is approximately -6 dB per octave, " |
| 844 | "the standard value for this setting is +6 dB per octave, " |
| 845 | "so that the spectrum is flattened and the higher formants look as strong as the lower ones. " |
| 846 | "When you raise the preemphasis, frequency bands above 1000 Hz will become darker, those below 1000 Hz will become lighter.") |
| 847 | TERM (U"%%Dynamic compression") |
| 848 | DEFINITION (U"determines how much stronger weak spectra should be made before drawing. " |
| 849 | "Normally, this parameter is between 0 and 1. If it is 0 (the standard value), there is no dynamic compression. " |
| 850 | "If it is 1, all spectra will be drawn equally strong, " |
| 851 | "i.e., all of them will contain frequencies that are drawn in black. " |
| 852 | "If this parameter is 0.4 and the global maximum is at 80 dB, then a spectrum with a maximum at 20 dB " |
| 853 | "(which will normally be drawn all white if the dynamic range is 50 dB), " |
| 854 | "will be raised by 0.4 * (80 - 20) = 24 dB, " |
| 855 | "so that its maximum will be seen at 44 dB (thus making this frame visible).") |
| 856 | MAN_END |
| 857 | |
| 858 | MAN_BEGIN (U"Intro 3.3. Querying the spectrogram", U"ppgb", 20221202) |
| 859 | NORMAL (U"If you click anywhere inside the spectrogram, a cursor cross will appear, " |
| 860 | "and you will see the time and frequency in red at the top and to the left of the window. " |
| 861 | "To see the time in the Info window, " |
| 862 | "choose ##Get cursor# from the #Spectrogram menu or press the F6 key. " |
| 863 | "To see the frequency in the Info window, " |
| 864 | "choose ##Get frequency# from the #Spectrogram menu.") |
| 865 | NORMAL (U"To query the power of the spectrogram at the cursor cross, " |
| 866 | "choose ##Get spectral power at cursor cross# from the #Spectrum menu or press the F9 key. " |
| 867 | "The Info window will show you the power density, expressed in Pascal^2/Hz.") |
| 868 | MAN_END |
| 869 | |
| 870 | MAN_BEGIN (U"Intro 3.4. Printing the spectrogram", U"ppgb", 20220907) |
| 871 | NORMAL (U"To print a spectrogram, or to put it in an EPS file or on the clipboard for inclusion in your word processor, " |
| 872 | "you first have to paint it into the @@Picture window@. " |
| 873 | "You do this by choosing ##Paint visible spectrogram...# " |
| 874 | "from the Spectrogram menu in the Sound or TextGrid window. " |
| 875 | "From the File menu in the Picture window, you can then print it, save it to an EPS file, " |
| 876 | "or copy it to the clipboard (to do Paste in your word processor, for instance).") |
| 877 | MAN_END |
| 878 | |
| 879 | MAN_BEGIN (U"Intro 3.5. The Spectrogram object", U"ppgb", 20220907) |
| 880 | NORMAL (U"To do more with spectrograms, you can create a @Spectrogram object in the @@List of Objects@. " |
| 881 | "You do this either by choosing ##Extract visible spectrogram# " |
| 882 | "from the Spectrogram menu in the Sound or TextGrid window, " |
| 883 | "or by selecting a Sound object in the list and choosing @@Sound: To Spectrogram...@ from the #Spectrum menu. " |
| 884 | "In either case, a new Spectrogram object will appear in the list. " |
| 885 | "To draw this Spectrogram object to the @@Picture window@, " |
| 886 | "select it and choose the @@Spectrogram: Paint...@ command. " |
| 887 | "From the Picture window, you can print it, save it to an EPS file, or copy it to the clipboard. " |
| 888 | "Many other commands are available in the @@dynamic menu@.") |
| 889 | MAN_END |
| 890 | |
| 891 | MAN_BEGIN (U"Intro 3.6. Viewing a spectral slice", U"ppgb", 20220907) |
| 892 | INTRO (U"With ##View spectral slice# from the #Spectrogram menu in the @SoundEditor and the @TextGridEditor, " |
| 893 | "you can see the frequency spectrum at the time cursor " |
| 894 | "or the average frequency spectrum in the time selection.") |
| 895 | ENTRY (U"Spectral slice at the cursor") |
| 896 | NORMAL (U"If you click anywhere in the wave form of the SoundEditor or TextGridEditor windows, " |
| 897 | "a cursor will appear at that time. If you then choose ##View spectral slice#, " |
| 898 | "Praat will create a @Spectrum object named %slice in the Objects window and show it in a @SpectrumEditor window. " |
| 899 | "In this way, you can inspect the frequency contents of the signal around the cursor position.") |
| 900 | ENTRY (U"Spectral slice from a selection") |
| 901 | NORMAL (U"If you drag the mouse through the wave form of the SoundEditor or TextGridEditor windows, " |
| 902 | "a @@time selection@ will appear. If you then choose ##View spectral slice#, " |
| 903 | "Praat will again create a @Spectrum object named %slice in the Objects window and show it in a @SpectrumEditor window. " |
| 904 | "In this way, you can inspect the frequency contents of the signal in the selection.") |
| 905 | MAN_END |
| 906 | |
| 907 | |
| 908 | MAN_BEGIN (U"Intro 3.7. Configuring the spectral slice", U"ppgb", 20110128) |
| 909 | ENTRY (U"Spectral slice at the cursor") |
| 910 | NORMAL (U"What Praat does precisely, depends on your Spectrogram settings. " |
| 911 | "Suppose that the %%window length% setting is 0.005 seconds (5 milliseconds). " |
| 912 | "If the %%window shape% is not Gaussian, Praat will extract the part of the sound " |
| 913 | "that runs from 2.5 milliseconds before the cursor to 2.5 ms after the cursor. " |
| 914 | "Praat then multiplies this 5 ms long signal by the window shape, then computes a spectrum " |
| 915 | "with the method of @@Sound: To Spectrum...@, which is put into the Objects window and opened in an editor window. " |
| 916 | "If the window shape is Gaussian, Praat will extract a part of the sound " |
| 917 | "that runs from 5 milliseconds before the cursor to 5 ms after the cursor. The spectrum will then be based " |
| 918 | "on a “physical” window length of 10 ms, although the “effective” window length is still 5 ms " |
| 919 | "(see @@Intro 3.2. Configuring the spectrogram@ for details).") |
| 920 | ENTRY (U"Spectral slice from a selection") |
| 921 | NORMAL (U"What Praat does precisely, again depends on the %%window shape% of your Spectrogram settings. " |
| 922 | "Suppose that your selection is 50 ms long. Praat will extract the entire selection, " |
| 923 | "then multiply this 50 ms long signal by the window shape, then compute a spectrum, put it into the Objects window and open it an editor window. " |
| 924 | "This procedure is equivalent to choosing ##Extract windowed selection...# (with a %%relative duration% of 1.0), " |
| 925 | "followed by ##To Spectrum...# (with %fast switched on), followed by #Edit.") |
| 926 | NORMAL (U"If the window is Gaussian, Praat will still only use the selection, without doubling its duration. " |
| 927 | "This means that the spectrum that you see in this case will mainly be based on the centre half of the selection, " |
| 928 | "and the signal near the edges will be largely ignored.") |
| 929 | MAN_END |
| 930 | |
| 931 | MAN_BEGIN (U"Intro 3.8. The Spectrum object", U"ppgb", 20030403) |
| 932 | NORMAL (U"To compute a Fourier frequency spectrum of an entire sound, " |
| 933 | "select a @Sound object and choose @@Sound: To Spectrum...|To Spectrum...@ from the #Spectrum menu. " |
| 934 | "A new @Spectrum object will appear in the @@List of Objects@. " |
| 935 | "To view or modify it (or listen to its parts), click @@View & Edit@. " |
| 936 | "To print it, choose one of the #Draw commands to draw the Spectrum object to the @@Picture window@ first.") |
| 937 | MAN_END |
| 938 | |
| 939 | MAN_BEGIN (U"Intro 4. Pitch analysis", U"ppgb", 20070905) |
| 940 | INTRO (U"This section describes how you can analyse the pitch contour of an existing sound.") |
| 941 | LIST_ITEM (U"@@Intro 4.1. Viewing a pitch contour") |
| 942 | LIST_ITEM (U"@@Intro 4.2. Configuring the pitch contour") |
| 943 | LIST_ITEM (U"@@Intro 4.3. Querying the pitch contour") |
| 944 | LIST_ITEM (U"@@Intro 4.4. Printing the pitch contour") |
| 945 | LIST_ITEM (U"@@Intro 4.5. The Pitch object") |
| 946 | MAN_END |
| 947 | |
| 948 | MAN_BEGIN (U"Intro 4.1. Viewing a pitch contour", U"ppgb", 20110128) |
| 949 | NORMAL (U"To see the pitch contour of an existing sound as a function of time, " |
| 950 | "select a @Sound or @LongSound object and choose @@View & Edit@. " |
| 951 | "A @SoundEditor window will appear on your screen. " |
| 952 | "The bottom half of this window will contain a pitch contour, drawn as a blue line or as a sequence of blue dots. " |
| 953 | "If you do not see the pitch contour, choose @@Show pitch@ from the #Pitch menu.") |
| 954 | NORMAL (U"To the right of the window, you may see three pitch values, written with blue digits: " |
| 955 | "at the bottom, you see the floor of the viewable pitch range, perhaps 75 Hz; at the top, " |
| 956 | "you see the ceiling of the pitch range, perhaps 600 Hz; and somewhere in between, you see the pitch value " |
| 957 | "at the cursor, or the average pitch in the selection.") |
| 958 | MAN_END |
| 959 | |
| 960 | MAN_BEGIN (U"Intro 4.2. Configuring the pitch contour", U"ppgb", 20231115 /*20190331*/) /*2024*/ |
| 961 | NORMAL (U"With @@Pitch settings...@ from the #Pitch menu, " |
| 962 | "you can determine how the pitch contour is displayed and how it is computed. " |
| 963 | "These settings will be remembered across Praat sessions. " |
| 964 | "All these settings have standard values (“factory settings”), which appear " |
| 965 | "when you click #Standards.") |
| 966 | ENTRY (U"The %%pitch range% (%%pitch floor and top%) setting") |
| 967 | NORMAL (U"This is the most important setting for pitch analysis. " |
| 968 | "The standard range (for filtered autocorrelation) is from 50 to 800 hertz, " |
| 969 | "which means that the pitch analysis method will only find values between 50 and 800 Hz " |
| 970 | "(and values between 400 and 800 Hz only rarely). " |
| 971 | "The range that you set here will be shown to the right of the analysis window.") |
| 972 | NORMAL (U"You may have set the range to values appropriate for your speaker, " |
| 973 | "because speakers can vary enormously in their pitch ranges. " |
| 974 | "For some low-pitched (e.g. average male) voices, you might want to set the floor to 50 Hz, and the top to 600 Hz; " |
| 975 | "for some high-pitched (e.g. average female) voices, a range of 100-800 Hz might instead be appropriate; " |
| 976 | "however, it may well be the case that the standard setting of 50–800 Hz will work for all of these voices. " |
| 977 | "On the high side, however, some children can reach almost 2000 Hz when yelling; " |
| 978 | "on the low side, creaky voice can go as low as 30 Hz; " |
| 979 | "if you investigate such cases, you may therefore want to experiment with this setting.") |
| 980 | NORMAL (U"Here is why you have to supply these settings. If the pitch floor is 50 Hz, " |
| 981 | "the pitch analysis method requires a 60-millisecond analysis window, " |
| 982 | "i.e., in order to measure the F0 at a time of, say, 0.850 seconds, " |
| 983 | "Praat needs to consider a part of the sound that runs from 0.820 to 0.880 seconds. " |
| 984 | "These 60 milliseconds correspond to 3 maximum pitch periods (3/50 = 0.060). " |
| 985 | "If you set the pitch floor down to 25 Hz, the analysis window will grow to 120 milliseconds " |
| 986 | "(which is again 3 maximum pitch periods), i.e., all times between 0.790 and 0.910 seconds will be considered. " |
| 987 | "This makes it less easy to see fast F0 changes.") |
| 988 | NORMAL (U"So setting the floor of the pitch range is a technical requirement for the pitch analysis. " |
| 989 | "If you set it too low, you will miss very fast F0 changes, and if you set it too high, " |
| 990 | "you will miss very low F0 values. For children's voices you can often use 200 Hz, " |
| 991 | "although 50 Hz will still give you the same time resolution as you get for low-pitched voices.") |
| 992 | ENTRY (U"The %units setting") |
| 993 | NORMAL (U"This setting determines the units of the vertical pitch scale. Most people like to see the pitch range " |
| 994 | "in hertz, but there are several other possibilities.") |
| 995 | ENTRY (U"View range different from analysis range") |
| 996 | NORMAL (U"Normally, the range of pitch values that can be seen in the editor window is equal to the range of pitch values " |
| 997 | "that the analysis algorithm can determine. If you set the analysis range from 50 to 800 Hz, this will be the range " |
| 998 | "you see in the editor window as well. If the pitch values in the curve happen to be between 350 and 400 Hz, " |
| 999 | "you may want to zoom in to the 350-400 Hz pitch region. " |
| 1000 | "You will usually do this by changing the pitch range in the @@Pitch settings...@ window. " |
| 1001 | "However, the analysis range will also change in that case, so that the curve itself may change. " |
| 1002 | "If you do not want that, you can change the %%View range% settings " |
| 1003 | "from “0.0 (= auto)” - “0.0 (= auto)” to something else, perhaps “350” - “400”.") |
| 1004 | ENTRY (U"Further reading") |
| 1005 | NORMAL (U"For more details, see:") |
| 1006 | LIST_ITEM (U"@@how to choose a pitch analysis method@") |
| 1007 | LIST_ITEM (U"@@pitch analysis by filtered autocorrelation@") |
| 1008 | LIST_ITEM (U"@@pitch analysis by raw cross-correlation@") |
| 1009 | LIST_ITEM (U"@@pitch analysis by raw autocorrelation@") |
| 1010 | LIST_ITEM (U"@@pitch analysis by filtered cross-correlation@") |
| 1011 | MAN_END |
| 1012 | |
| 1013 | MAN_BEGIN (U"Time step settings...", U"ppgb", 20231115 /*20031003,20220814*/) |
| 1014 | INTRO (U"A command in the #Analysis menu of the @SoundEditor and @TextGridEditor " |
| 1015 | "to determine the time interval between consecutive measurements " |
| 1016 | "of pitch, formants, and intensity.") |
| 1017 | ENTRY (U"Automatic time steps") |
| 1018 | NORMAL (U"It is recommended that you set the %%Time step strategy% to #Automatic. " |
| 1019 | "In this way, Praat computes just enough pitch, formant, and intensity values to draw " |
| 1020 | "reliable pitch, formant, and intensity contours. In general, Praat will compute 4 values " |
| 1021 | "within an analysis window (“four times oversampling”).") |
| 1022 | NORMAL (U"As described in @@Sound: To Pitch (filtered ac)...@, " |
| 1023 | "Praat's standard time step for pitch analysis is 0.75 divided by the pitch floor, " |
| 1024 | "e.g., if the pitch floor is 50 Hz, the time step will be 0.015 seconds. " |
| 1025 | "In this way, there will be 4 pitch measurements within an analysis window, which is 3 / (50 Hz) = 60 milliseconds long.") |
| 1026 | NORMAL (U"As described in @@Sound: To Formant (burg)...@, Praat's standard time step for formant measurements is the %%Window length% divided by 4, " |
| 1027 | "e.g. if the window length is 0.025 seconds, the time step will be 6.25 milliseconds.") |
| 1028 | NORMAL (U"As described in @@Sound: To Intensity...@, Praat's standard time step for intensity measurements is 0.8 divided by the pitch floor, " |
| 1029 | "e.g. if the pitch floor is 50 Hz, the time step will be 16 milliseconds. " |
| 1030 | "In this way, there will be 4 intensity measurements within an intensity analysis window, " |
| 1031 | "which is 3.2 / (50 Hz) = 64 milliseconds long.") |
| 1032 | ENTRY (U"Fixed time step") |
| 1033 | NORMAL (U"You can override the automatic time step by setting the %%Time step strategy% to #Fixed. " |
| 1034 | "The %%Fixed time step% setting then determines the time step that Praat will use: " |
| 1035 | "if you set it to 0.001 seconds, Praat will compute pitch, formant, and intensity values for every millisecond. " |
| 1036 | "Beware that this can slow down the editor window appreciably, because this step is much smaller " |
| 1037 | "than usual values of the automatic time step (see above).") |
| 1038 | NORMAL (U"Enlarging the time step to e.g. 0.1 seconds will speed up the editor window " |
| 1039 | "but may render the pitch, formant, and intensity curves less exact (they become %undersampled), " |
| 1040 | "which will influence your measurements and the locations of the pulses.") |
| 1041 | NORMAL (U"If there are fewer than 2.0 pitch measurement points per analysis window, " |
| 1042 | "Praat will draw the pitch curve as separate little blue disks " |
| 1043 | "rather than as a continuous blue curve, in order to warn you of the undersampling. " |
| 1044 | "E.g. if the pitch floor is 75 Hz, Praat will draw the pitch curve as disks if the time step is greater than 0.02 seconds.") |
| 1045 | ENTRY (U"View-dependent time step") |
| 1046 | NORMAL (U"Another way to override the standard time step is by setting the %%Time step strategy% to ##View-dependent#. " |
| 1047 | "The %%Number of time steps per view% setting then determines the time step that Praat will use: " |
| 1048 | "if you set it to 100, Praat will always compute 100 pitch, formant, and intensity values within the view window. " |
| 1049 | "More precisely: if you zoom the view window to 3 seconds, Praat will show you 100 pitch, formant, and intensity points at distances " |
| 1050 | "of 0.03 seconds (or fewer than 100, if you are near the left or right edge of the signal). " |
| 1051 | "As with the %%Fixed time step% setting, Praat will draw the pitch as separate disks in case of undersampling. " |
| 1052 | "You may want to use this setting if you want the pitch curve to be drawn equally fast independently of the degree " |
| 1053 | "of zooming.") |
| 1054 | MAN_END |
| 1055 | |
| 1056 | MAN_BEGIN (U"Intro 4.3. Querying the pitch contour", U"ppgb", 20040614) |
| 1057 | NORMAL (U"With @@Get pitch@ from the #Pitch menu in the @SoundEditor or @TextGridEditor, " |
| 1058 | "you get information about the pitch at the cursor or in the selection. " |
| 1059 | "If a cursor is visible in the window, ##Get pitch# writes to the @@Info window@ " |
| 1060 | "the linearly interpolated pitch at that time; " |
| 1061 | "if a time selection is visible inside the window, ##Get pitch# writes to the @@Info window@ " |
| 1062 | "the mean (average) pitch in the visible part of that selection; " |
| 1063 | "otherwise, ##Get pitch# writes the average pitch in the visible part of the sound.") |
| 1064 | MAN_END |
| 1065 | |
| 1066 | MAN_BEGIN (U"Intro 4.4. Printing the pitch contour", U"ppgb", 20070905) |
| 1067 | NORMAL (U"To print a pitch contour, or to put it in an EPS file or on the clipboard for inclusion in your word processor, " |
| 1068 | "you first have to draw it into the @@Picture window@. " |
| 1069 | "You do this by choosing ##Draw visible pitch contour...# " |
| 1070 | "from the Pitch menu in the Sound or TextGrid window. " |
| 1071 | "From the File menu in the Picture window, you can then print it, save it to an EPS file, " |
| 1072 | "or copy it to the clipboard (to do Paste in your word processor, for instance).") |
| 1073 | MAN_END |
| 1074 | |
| 1075 | MAN_BEGIN (U"Intro 4.5. The Pitch object", U"ppgb", 20110128) |
| 1076 | NORMAL (U"The pitch contour that is visible in the @SoundEditor or @TextGridEditor window, " |
| 1077 | "can be copied as a separate @Pitch object to the @@List of Objects@. To do this, " |
| 1078 | "choose @@Extract visible pitch contour@ from the #Pitch menu.") |
| 1079 | NORMAL (U"Another way to get a separate Pitch object is to select a @Sound object in the list " |
| 1080 | "choose @@Sound: To Pitch...@ (preferred) or any of the other methods from the @@Periodicity menu@.") |
| 1081 | NORMAL (U"To view and modify the contents of a Pitch object, select it and choose @@View & Edit@. " |
| 1082 | "This creates a @PitchEditor window on your screen.") |
| 1083 | NORMAL (U"To save a pitch contour to disk, select the @Pitch object in the list and choose one of the commands in the @@Save menu@.") |
| 1084 | NORMAL (U"Later on, you can read the saved file again with @@Read from file...@ from the @@Open menu@.") |
| 1085 | NORMAL (U"To draw a @Pitch object to the @@Picture window@, select it and choose any of the commands in the @@Draw menu@. " |
| 1086 | "From the Picture window, you can print it, save it to an EPS file, or copy it to the clipboard for inclusion in your word processor.") |
| 1087 | MAN_END |
| 1088 | |
| 1089 | MAN_BEGIN (U"Advanced pulses settings...", U"ppgb", 20110220) |
| 1090 | INTRO (U"A command in the #Pulses menu of the @SoundEditor or @TextGridEditor windows. " |
| 1091 | "Before changing the advanced pulses settings, make sure you understand " |
| 1092 | "the @@Voice@ tutorial.") |
| 1093 | NORMAL (U"For information about the ##Maximum period factor# setting, see @@PointProcess: Get jitter (local)...@. " |
| 1094 | "The standard setting is best in most cases. " |
| 1095 | "The ##Period floor# and ##Period ceiling# settings derive from the pitch floor and pitch ceiling (@@Pitch settings...@), " |
| 1096 | "according to a formula given in @@Voice 2. Jitter@.") |
| 1097 | MAN_END |
| 1098 | |
| 1099 | MAN_BEGIN (U"Intro 5. Formant analysis", U"ppgb", 20030316) |
| 1100 | INTRO (U"This section describes how you can analyse the formant contours of an existing sound.") |
| 1101 | LIST_ITEM (U"@@Intro 5.1. Viewing formant contours") |
| 1102 | LIST_ITEM (U"@@Intro 5.2. Configuring the formant contours") |
| 1103 | LIST_ITEM (U"@@Intro 5.3. Querying the formant contours") |
| 1104 | LIST_ITEM (U"@@Intro 5.4. The Formant object") |
| 1105 | MAN_END |
| 1106 | |
| 1107 | MAN_BEGIN (U"Intro 5.1. Viewing formant contours", U"ppgb", 20110128) |
| 1108 | NORMAL (U"To see the formant contours of a sound as functions of time, select a @Sound or @LongSound object and choose @@View & Edit@. " |
| 1109 | "A @SoundEditor window will appear on your screen. " |
| 1110 | "The analysis part of this window will contain formant contours, drawn as red speckles. " |
| 1111 | "If you do not see the formant contours, choose @@Show formant@ from the #Formant menu.") |
| 1112 | MAN_END |
| 1113 | |
| 1114 | MAN_BEGIN (U"Intro 5.2. Configuring the formant contours", U"ppgb", 20030316) |
| 1115 | NORMAL (U"The formant analysis parameters, with you can set with the #Formant menu, are important. " |
| 1116 | "For a female voice, you may want to set the maximum frequency to 5500 Hz; " |
| 1117 | "for a male voice, set it to 5000 Hz instead. " |
| 1118 | "For more information about analysis parameters, see @@Sound: To Formant (burg)...@.") |
| 1119 | MAN_END |
| 1120 | |
| 1121 | MAN_BEGIN (U"Intro 5.3. Querying the formant contours", U"ppgb", 20040616) |
| 1122 | NORMAL (U"With @@Get first formant@ from the Formant menu in the @SoundEditor or @TextGridEditor, " |
| 1123 | "you get information about the first formant at the cursor or in the selection. " |
| 1124 | "If there is a cursor, ##Get first formant# writes to the @@Info window@ the linearly interpolated first formant at that time. " |
| 1125 | "If there is a true selection, ##Get first formant# writes to the @@Info window@ the mean first formant in the visble part of that selection. " |
| 1126 | "The same goes for @@Get second formant@ and so on.") |
| 1127 | MAN_END |
| 1128 | |
| 1129 | MAN_BEGIN (U"Intro 5.4. The Formant object", U"ppgb", 20030316) |
| 1130 | NORMAL (U"The formant contours that are visible in the @SoundEditor or @TextGridEditor window, " |
| 1131 | "can be copied as a separate @Formant object to the @@List of Objects@. To do this, " |
| 1132 | "choose @@Extract visible formant contour@ from the Formant menu.") |
| 1133 | NORMAL (U"Another way to get a separate Formant object is to select a @Sound object in the list " |
| 1134 | "choose @@Sound: To Formant (burg)...@ (preferred) or any of the other methods " |
| 1135 | "from the @@Formants & LPC menu@.") |
| 1136 | ENTRY (U"Saving formant contours to disk") |
| 1137 | NORMAL (U"To save formant contours to disk, select the @Formant object in the list and choose one of the commands in the @@Save menu@.") |
| 1138 | NORMAL (U"Later on, you can read the saved file again with @@Read from file...@ from the @@Open menu@.") |
| 1139 | ENTRY (U"Drawing formant contours") |
| 1140 | NORMAL (U"To draw a @Formant object to the @@Picture window@, select it and choose any of the commands in the @@Draw menu@. " |
| 1141 | "From the Picture window, you can print it, save it to an EPS file, or copy it to the clipboard for inclusion in your word processor.") |
| 1142 | MAN_END |
| 1143 | |
| 1144 | MAN_BEGIN (U"Intro 6. Intensity analysis", U"ppgb", 20030316) |
| 1145 | INTRO (U"This section describes how you can analyse the intensity contour of an existing sound.") |
| 1146 | LIST_ITEM1 (U"@@Intro 6.1. Viewing an intensity contour") |
| 1147 | LIST_ITEM1 (U"@@Intro 6.2. Configuring the intensity contour") |
| 1148 | LIST_ITEM1 (U"@@Intro 6.3. Querying the intensity contour") |
| 1149 | LIST_ITEM1 (U"@@Intro 6.4. The Intensity object") |
| 1150 | MAN_END |
| 1151 | |
| 1152 | MAN_BEGIN (U"Intro 6.1. Viewing an intensity contour", U"ppgb", 20110128) |
| 1153 | INTRO (U"To see the intensity contour of a sound as a function of time, select a @Sound or @LongSound object and choose @@View & Edit@. " |
| 1154 | "A @SoundEditor window will appear on your screen. " |
| 1155 | "The analysis part of this window will contain an intensity contour, drawn as a yellow or green line " |
| 1156 | "(choose ##Show intensity# from the #Intensity menu if it is not visible). " |
| 1157 | "This also works in the @TextGridEditor.") |
| 1158 | MAN_END |
| 1159 | |
| 1160 | MAN_BEGIN (U"Intro 6.2. Configuring the intensity contour", U"ppgb", 20041123) // 2023 |
| 1161 | INTRO (U"With ##Intensity settings...# from the #Intensity menu, " |
| 1162 | "you can control how the intensity contour is computed and how it is shown.") |
| 1163 | ENTRY (U"The view range") |
| 1164 | NORMAL (U"By changing these two numbers you can set the vertical scale. " |
| 1165 | "The standard setting is from 50 to 100 dB, but if you are interested in the power of the background noise " |
| 1166 | "you may want to set it to the range from 0 to 100 dB.") |
| 1167 | ENTRY (U"The averaging method") |
| 1168 | NORMAL (U"Averaging is what occurs if you make a @@time selection@ (rather than setting the cursor at a single time). " |
| 1169 | "The green number in dB to the left or right side of the intensity contour will show the average " |
| 1170 | "intensity in the selection. The same value is what you get when choosing ##Get intensity# from " |
| 1171 | "the #Intensity menu. You can choose any of the three averaging methods " |
| 1172 | "available for @@Intensity: Get mean...@, or choose for the #median value in the selection.") |
| 1173 | ENTRY (U"Pitch floor") |
| 1174 | NORMAL (U"The intensity curve is %smoothed, since you usually do not want the intensity curve to go up and down with " |
| 1175 | "the intensity variations within a pitch period. To avoid such pitch-synchronous variations, " |
| 1176 | "the intensity at every time point is a weighted average over many neighbouring time points. " |
| 1177 | "The weighting is performed by a Gaussian (“double Kaiser”) window that has a duration that is determined by the " |
| 1178 | "##Pitch floor# setting (see @@Intro 4.2. Configuring the pitch contour@). " |
| 1179 | "To see more detail than usual, raise the pitch floor; to get more smoothing than usual, lower it. " |
| 1180 | "For more information, see @@Sound: To Intensity...@.") |
| 1181 | ENTRY (U"Subtract mean pressure or not?") |
| 1182 | NORMAL (U"Many microphones, microphone preamplifiers, or other components in the recording system " |
| 1183 | "can add a constant level to the air pressure (a %%DC offset%). " |
| 1184 | "You can see this at quiet locations in the wave form, " |
| 1185 | "where the average pressure is not zero but the background noise hovers about some non-zero value. " |
| 1186 | "You will usually not want to take this constant pressure seriously, i.e. the intensity curve should " |
| 1187 | "normally not take into account the energy provided by this constant pressure level. " |
| 1188 | "If you switch on the ##Subtract mean pressure# switch (whose standard setting is also on), " |
| 1189 | "the intensity value at a time point is computed by first subtracting the mean pressure around this point, " |
| 1190 | "and then applying the Gaussian window.") |
| 1191 | MAN_END |
| 1192 | |
| 1193 | MAN_BEGIN (U"Intro 6.3. Querying the intensity contour", U"ppgb", 20041123) |
| 1194 | INTRO (U"To ask for the intensity at the cursor, or the average intensity in the visible part of the selection, " |
| 1195 | "choose ##Get intensity# from the #Intensity menu or press the F11 key. You get the same value in dB that is visible " |
| 1196 | "to the left or right side of the intensity curve, but with more digits.") |
| 1197 | MAN_END |
| 1198 | |
| 1199 | MAN_BEGIN (U"Intro 6.4. The Intensity object", U"ppgb", 20041123) |
| 1200 | NORMAL (U"To print an intensity contour, or to put it in an EPS file or on the clipboard for inclusion in your word processor, " |
| 1201 | "you first have to create an @Intensity object in the @@List of Objects@. " |
| 1202 | "You do this either by choosing ##Extract visible intensity contour# " |
| 1203 | "from the #Intensity menu in the SoundEditor or TextGridEditor window, " |
| 1204 | "or by selecting a Sound object in the list and choosing @@Sound: To Intensity...@. " |
| 1205 | "In either case, a new Intensity object will appear in the list. " |
| 1206 | "To draw the Intensity object to the @@Picture window@, select it and choose ##Draw...#. " |
| 1207 | "From the Picture window, you can print it, save it to an EPS file, or copy it to the clipboard.") |
| 1208 | MAN_END |
| 1209 | |
| 1210 | MAN_BEGIN (U"Intro 7. Annotation", U"ppgb", 20110129) |
| 1211 | INTRO (U"You can annotate existing @Sound objects and sound files (@LongSound objects).") |
| 1212 | NORMAL (U"The labelling data will reside in a @TextGrid object. This object is separate " |
| 1213 | "from the sound, which means that you will often see two objects in the list: a Sound or LongSound, " |
| 1214 | "and a TextGrid.") |
| 1215 | ENTRY (U"Creating a TextGrid") |
| 1216 | NORMAL (U"You create a new empty TextGrid from the Sound or LongSound with @@Sound: To TextGrid...@ " |
| 1217 | "or @@LongSound: To TextGrid...@ from the #Annotate menu (which shows up in the Objects window if you select a Sound or LongSound). In this way, the time domain " |
| 1218 | "of the @TextGrid will automatically equal that of the sound (if you choose @@Create TextGrid...@ from " |
| 1219 | "the @@New menu@ instead, you will have to supply the time domain by yourself).") |
| 1220 | NORMAL (U"When you create a TextGrid, you specify the names of the %tiers. For instance, if you want to segment " |
| 1221 | "the sound into words and into phonemes, you may want to create two tiers and call them " |
| 1222 | "\"words\" and \"phonemes\" (you can easily add, remove, and rename tiers later). " |
| 1223 | "Since both of these tiers are %%interval tiers% (you label the intervals between the word and phoneme " |
| 1224 | "boundaries, not the boundaries themselves), you specify \"phonemes words\" for %%Tier names%, " |
| 1225 | "and you leave the %%Point tiers% empty.") |
| 1226 | ENTRY (U"View and edit") |
| 1227 | NORMAL (U"You can edit a TextGrid object all by itself, but you will normally want to see " |
| 1228 | "the sound in the editor window as well. To achieve this, you select both the Sound (or LongSound) and " |
| 1229 | "the TextGrid, and click @@View & Edit@. A @TextGridEditor will appear on your screen. " |
| 1230 | "Like the Sound editor, the TextGrid editor will show you a spectrogram, a pitch contour, a formant contour, " |
| 1231 | "and an intensity contour. This editor will allow " |
| 1232 | "you to add, remove, and edit labels, boundaries, and tiers. Under Help in the TextGridEditor, you will " |
| 1233 | "find the @TextGridEditor manual page. You are strongly advised to read it, because it will show you " |
| 1234 | "how you can quickly zoom (drag the mouse), play (click a rectangle), or edit a label (just type).") |
| 1235 | ENTRY (U"Save") |
| 1236 | NORMAL (U"You will normally write the TextGrid to disk with @@Save as text file...@ " |
| 1237 | "or @@Save as short text file...@. It is true that @@Save as binary file...@ will also work, but the others " |
| 1238 | "give you a file you can read with any text editor.") |
| 1239 | NORMAL (U"However you saved it, you can read the TextGrid into Praat later with @@Read from file...@.") |
| 1240 | MAN_END |
| 1241 | |
| 1242 | MAN_BEGIN (U"Intro 8. Manipulation", U"ppgb", 20021212) //2025 |
| 1243 | LIST_ITEM (U"@@Intro 8.1. Manipulation of pitch") |
| 1244 | LIST_ITEM (U"@@Intro 8.2. Manipulation of duration") |
| 1245 | LIST_ITEM (U"@@Intro 8.3. Manipulation of intensity") |
| 1246 | LIST_ITEM (U"@@Intro 8.4. Manipulation of formants") |
| 1247 | MAN_END |
| 1248 | |
| 1249 | MAN_BEGIN (U"Intro 8.1. Manipulation of pitch", U"ppgb", 20220814) |
| 1250 | INTRO (U"To modify the pitch contour of an existing @Sound object, " |
| 1251 | "you select this @Sound and click ##To Manipulation#. " |
| 1252 | "A @Manipulation object will then appear in the list. " |
| 1253 | "You can then click @@View & Edit@ to raise a @ManipulationEditor, " |
| 1254 | "which will show the pitch contour (@PitchTier) as a series of thick blue dots. " |
| 1255 | "To reduce the number of dots, choose ##Stylize pitch (2 st)# " |
| 1256 | "from the #Pitch menu; it will then be easy to drag the dots " |
| 1257 | "around the time–pitch area (press the Option key to restrict dragging to vertical, " |
| 1258 | "and the Command key to restrict dragging to horizontal; mnemonics: Uption, Come Later).") |
| 1259 | NORMAL (U"If you click any of the rectangles " |
| 1260 | "(or choose any of the commands from the #Play menu), " |
| 1261 | "you will hear the modified sound. By shift-clicking, you will hear " |
| 1262 | "the original sound.") |
| 1263 | NORMAL (U"To get the modified sound as a separate object, " |
| 1264 | "choose ##Publish resynthesis# from the @@File menu@.") |
| 1265 | NORMAL (U"If you modify the duration curve as well (see @@Intro 8.2. Manipulation of duration@), " |
| 1266 | "the modified sound will be based on the modified pitch and duration.") |
| 1267 | ENTRY (U"Cloning a pitch contour") |
| 1268 | NORMAL (U"To use the pitch contour of one Manipulation object as the pitch contour of another Manipulation object, " |
| 1269 | "you first choose ##Extract pitch tier# for the first Manipulation object, " |
| 1270 | "then select the resulting PitchTier object together with the other Manipulation object " |
| 1271 | "(e.g. by a click on the PitchTier and a @@Command-click@ on the Manipulation), " |
| 1272 | "and choose ##Replace pitch tier#.") |
| 1273 | ENTRY (U"Precise manipulation of pitch") |
| 1274 | NORMAL (U"If you know exactly what pitch contour you want, " |
| 1275 | "you can create an empty PitchTier with @@Create PitchTier...@ from the New menu, " |
| 1276 | "then add points with @@PitchTier: Add point...@.") |
| 1277 | NORMAL (U"For instance, suppose you want to have a pitch that falls from 350 to 150 Hz in one second. " |
| 1278 | "You create the PitchTier, then add a point at 0 seconds and a frequency of 350 Hz, " |
| 1279 | "and a point at 1 second with a frequency of 150 Hz. " |
| 1280 | "You can put this PitchTier into a Manipulation object in the way described above.") |
| 1281 | MAN_END |
| 1282 | |
| 1283 | MAN_BEGIN (U"Intro 8.2. Manipulation of duration", U"ppgb", 20200901) |
| 1284 | INTRO (U"You can use Praat to modify the relative durations in an existing sound.") |
| 1285 | NORMAL (U"First, you select a @Sound object and click \"To Manipulation\". " |
| 1286 | "A @Manipulation object will then appear in the list. " |
| 1287 | "You can then click @@View & Edit@ to raise a @ManipulationEditor, " |
| 1288 | "which will show an empty @DurationTier. " |
| 1289 | "You can add targets to this tier by choosing \"Add duration point at cursor\" " |
| 1290 | "from the \"Dur\" menu. The targets will show up as blue dots, which you can easily drag " |
| 1291 | "around the duration area.") |
| 1292 | NORMAL (U"If you click any of the rectangles " |
| 1293 | "(or choose any of the commands from the @Play menu), " |
| 1294 | "you will hear the modified sound. By shift-clicking, you will hear " |
| 1295 | "the original sound.") |
| 1296 | NORMAL (U"To get the modified sound as a separate object, " |
| 1297 | "choose ##Publish resynthesis# from the @@File menu@.") |
| 1298 | NORMAL (U"If you modify the pitch curve as well (see @@Intro 8.1. Manipulation of pitch@), " |
| 1299 | "the modified sound will be based on the modified duration and pitch.") |
| 1300 | ENTRY (U"Precise manipulation of duration") |
| 1301 | NORMAL (U"If you know exactly the times and relative durations, it is advisable to write a script (see @Scripting). " |
| 1302 | "Suppose, for instance, that you have a 355-ms piece of sound, and you want to shorten the first 85 ms to 70 ms, " |
| 1303 | "and the remaining 270 ms to 200 ms.") |
| 1304 | NORMAL (U"In your first 85 ms, your relative duration should be 70/85, " |
| 1305 | "and during the last 270 ms, it should be 200/270. " |
| 1306 | "The DurationTier does linear interpolation, so it can only approximate these precise times, " |
| 1307 | "but fortunately to any precision you like:") |
| 1308 | CODE (U"Create DurationTier: \"shorten\", 0, 0.085 + 0.270") |
| 1309 | CODE (U"Add point: 0.000, 70/85") |
| 1310 | CODE (U"Add point: 0.084999, 70/85") |
| 1311 | CODE (U"Add point: 0.085001, 200/270") |
| 1312 | CODE (U"Add point: 0.355, 200/270") |
| 1313 | NORMAL (U"To put this DurationTier back into a Manipulation object, you select the two objects together " |
| 1314 | "(e.g. a click on the DurationTier and a @@Command-click@ on the Manipulation), " |
| 1315 | "and choose ##Replace duration tier#.") |
| 1316 | MAN_END |
| 1317 | |
| 1318 | MAN_BEGIN (U"Intro 8.3. Manipulation of intensity", U"ppgb", 20110128) |
| 1319 | INTRO (U"You can modify the intensity contour of an existing sound.") |
| 1320 | NORMAL (U"While the pitch and duration of a sound can be modified with the @ManipulationEditor " |
| 1321 | "(see @@Intro 8.1. Manipulation of pitch@ and @@Intro 8.2. Manipulation of duration@), " |
| 1322 | "the modification of the intensity curve is done in a different way.") |
| 1323 | NORMAL (U"You can create an @IntensityTier with the command @@Create IntensityTier...@ " |
| 1324 | "from the @@New menu@. With @@View & Edit@, you can add points to this tier. " |
| 1325 | "You can then \"multiply\" this tier with a sound, by selecting the @Sound and the " |
| 1326 | "IntensityTier together and clicking @@Sound & IntensityTier: Multiply|Multiply@. " |
| 1327 | "The points in the IntensityTier represent relative intensities in dB; " |
| 1328 | "therefore, the sound pressure values in the Sound are multiplied by 10^^(dB/20)^.") |
| 1329 | NORMAL (U"Instead of an IntensityTier, you can use an @AmplitudeTier; " |
| 1330 | "when you click #Multiply for a selected Sound and AmplitudeTier, " |
| 1331 | "the sound pressure values in the Sound are directly multiplied by the values in the AmplitudeTier.") |
| 1332 | MAN_END |
| 1333 | |
| 1334 | MAN_BEGIN (U"Intro 8.4. Manipulation of formants", U"ppgb", 20010408) |
| 1335 | INTRO (U"The manipulation of formant contours cannot be as straightforward as the manipulation " |
| 1336 | "of pitch, duration, or intensity contours. See the @@Source-filter synthesis@ tutorial " |
| 1337 | "for an explanation of how formants can be modified in Praat.") |
| 1338 | MAN_END |
| 1339 | |
| 1340 | |
| 1341 | /* |
| 1342 | * Who uses Praat? |
| 1343 | * phonetics |
| 1344 | * linguistics |
| 1345 | * speech pathology |
| 1346 | * psychology |
| 1347 | * bioacoustics: e.g. |
| 1348 | hapalemur, crow, monkey, frog, turtle dove, grasshopper, cricket, alligator, crocodile, |
| 1349 | gecko, elephant, swallow, chicken, dolphin, humpback, [killer] whale, [electric] fish, |
| 1350 | sparrow, meerkat, [fruit] bat, lion, parrot, red deer, sperm whale, [bearded] seal, mouse, cracid, chacma baboon |
| 1351 | * music |
| 1352 | */ |
| 1353 | |
| 1354 | MAN_BEGIN (U"Labelling", U"ppgb", 20010408) |
| 1355 | INTRO (U"See @@Intro 7. Annotation@.") |
| 1356 | MAN_END |
| 1357 | |
| 1358 | MAN_BEGIN (U"List of Objects", U"ppgb", 20210228) |
| 1359 | INTRO (U"A list in the left-hand part of the @@Objects window@.") |
| 1360 | ENTRY (U"Purpose") |
| 1361 | NORMAL (U"If you select one or more @objects in this list, " |
| 1362 | "the possible actions that you can perform with the selected objects " |
| 1363 | "will appear in the @@Dynamic menu@.") |
| 1364 | ENTRY (U"How to select objects") |
| 1365 | NORMAL (U"To select one object (and deselect all the others), click on the object.") |
| 1366 | NORMAL (U"To extend the selection, drag the mouse or use Shift-click.") |
| 1367 | NORMAL (U"To change the selection of one object (without changing the others), use @@Command-click@.") |
| 1368 | MAN_END |
| 1369 | |
| 1370 | MAN_PAGES_BEGIN |
| 1371 | R"~~~( |
| 1372 | ################################################################################ |
| 1373 | "New menu" |
| 1374 | © Paul Boersmma 2016,2023 |
| 1375 | |
| 1376 | The ##New menu# is one of the menus in the @@Objects window@. |
| 1377 | You use this menu to create new objects from scratch. It contains the following commands: |
| 1378 | |
| 1379 | • @@Record mono Sound... |
| 1380 | • @@Record stereo Sound... |
| 1381 | |
| 1382 | , Sound: |
| 1383 | • @@Create Sound as pure tone... |
| 1384 | • @@Create Sound from formula... |
| 1385 | • @@Create Sound as tone complex... |
| 1386 | • @@Create Sound as gammatone... |
| 1387 | • @@Create Sound as Shepard tone... |
| 1388 | • @@Create TextGrid... |
| 1389 | |
| 1390 | , Tiers: |
| 1391 | • @@Create empty PointProcess... |
| 1392 | • @@Create Poisson process... |
| 1393 | • @@Create PitchTier... |
| 1394 | • @@Create FormantGrid... |
| 1395 | • @@Create IntensityTier... |
| 1396 | • @@Create DurationTier... |
| 1397 | • @@Create AmplitudeTier... |
| 1398 | |
| 1399 | • @@Create Corpus... |
| 1400 | |
| 1401 | , Tables: |
| 1402 | • @@Create Table with column names... |
| 1403 | • @@Create Table without column names... |
| 1404 | • ##Create TableOfReal... |
| 1405 | , Datasets from the literature: |
| 1406 | • @@Create formant table (Peterson & Barney 1952) |
| 1407 | ///• Create formant table (Hillenbrand et al. 1995) |
| 1408 | • @@Create formant table (Pols & Van Nierop 1973) |
| 1409 | • @@Create formant table (Weenink 1985) |
| 1410 | • @@Create H1H2 table (Keating & Esposito 2006) |
| 1411 | • @@Create Table (Ganong 1980) |
| 1412 | • @@Create iris data set |
| 1413 | , |
| 1414 | • @@Create TableOfReal (Pols 1973)... |
| 1415 | • @@Create TableOfReal (Van Nierop 1973)... |
| 1416 | • @@Create TableOfReal (Weenink 1985)... |
| 1417 | • @@Create TableOfReal (Sandwell 1987) |
| 1418 | |
| 1419 | , Stats: |
| 1420 | , Multidimensional scaling: |
| 1421 | • @@Multidimensional scaling@ tutorial |
| 1422 | • Create letter R example... |
| 1423 | • Create INDSCAL Carrol Wish example... |
| 1424 | • Create Configuration... |
| 1425 | • Draw splines... |
| 1426 | • Draw MDS class relations |
| 1427 | |
| 1428 | , Generics: |
| 1429 | , Matrix: |
| 1430 | • @@Create Matrix...@ (from a formula) |
| 1431 | • @@Create simple Matrix...@ (from a formula) |
| 1432 | • @@Create simple Matrix from values... |
| 1433 | , Photo: |
| 1434 | • @@Create Photo...@ (from a formula) |
| 1435 | • @@Create simple Photo...@ (from a formula) |
| 1436 | , Polygon: |
| 1437 | • @@Create Polygon from values... |
| 1438 | , Strings: |
| 1439 | • @@Create Strings as file list... |
| 1440 | • @@Create Strings as folder list... |
| 1441 | • @@Create Strings from tokens... |
| 1442 | • @@Create Permutation... |
| 1443 | , Polynomial: |
| 1444 | • @@Create Polynomial... |
| 1445 | • ##Create Polynomial from product terms... |
| 1446 | • ##Create Polynomial from real zeros... |
| 1447 | • @@Create LegendreSeries... |
| 1448 | • @@Create ChebyshevSeries... |
| 1449 | • @@Create MSpline... |
| 1450 | • @@Create ISpline... |
| 1451 | , Acoustic synthesis (Klatt): |
| 1452 | • @KlattGrid help |
| 1453 | • @@Create KlattGrid... |
| 1454 | • @@Create KlattGrid from vowel... |
| 1455 | , Articulatory synthesis: |
| 1456 | • @@Articulatory synthesis@ tutorial |
| 1457 | • ##Create Articulation... |
| 1458 | • @@Create Speaker... |
| 1459 | • @@Create Artword... |
| 1460 | • ##Create VocalTract from phone... |
| 1461 | , Text-to-speech synthesis: |
| 1462 | • @@Create SpeechSynthesizer... |
| 1463 | , Constraint grammars: |
| 1464 | • @@OT learning@ tutorial |
| 1465 | • @@Create NoCoda grammar |
| 1466 | • ##Create place assimilation grammar |
| 1467 | • ##Create place assimilation distribution |
| 1468 | • @@Create tongue-root grammar... |
| 1469 | • ##Create metrics grammar... |
| 1470 | • ##Create multi-level metrics grammar... |
| 1471 | , Symmetric neural networks: |
| 1472 | • ##Create empty Network... |
| 1473 | • ##Create rectangular Network... |
| 1474 | • ##Create rectangular Network (vertical)... |
| 1475 | • ##Create Net as deep belief network... |
| 1476 | , Feedforward neural networks: |
| 1477 | • @@Create FFNet... |
| 1478 | • @@Create iris example... |
| 1479 | , Advanced: |
| 1480 | • @@Create FFNet (linear outputs)... |
| 1481 | • ##Create PatternList... |
| 1482 | • ##Create Categories... |
| 1483 | |
| 1484 | To create new objects from files on disk, use the @@Open menu@ instead. |
| 1485 | Objects can also often be created from other objects, with commands that start with ##To#. |
| 1486 | ################################################################################ |
| 1487 | )~~~" |
| 1488 | MAN_PAGES_END |
| 1489 | |
| 1490 | MAN_BEGIN (U"Objects window", U"ppgb", 20230325) |
| 1491 | INTRO (U"One of the two main windows in the Praat program.") |
| 1492 | ENTRY (U"Subdivision") |
| 1493 | LIST_ITEM (U"To the left: the @@List of Objects@.") |
| 1494 | LIST_ITEM (U"To the right: the @@Dynamic menu@.") |
| 1495 | ENTRY (U"Fixed buttons") |
| 1496 | NORMAL (U"The following buttons appear below the List of Objects:") |
| 1497 | LIST_ITEM (U"• @@Rename...") |
| 1498 | LIST_ITEM (U"• @@Info") |
| 1499 | LIST_ITEM (U"• @@Copy...") |
| 1500 | LIST_ITEM (U"• @@Remove") |
| 1501 | LIST_ITEM (U"• @@Inspect") |
| 1502 | ENTRY (U"Menus") |
| 1503 | LIST_ITEM (U"The Objects window contains several fixed menus: " |
| 1504 | "the #Praat, #New, #Open, and #Help menus. " |
| 1505 | "It also contains the @@Save menu@, whose contents vary with the kinds of selected objects, " |
| 1506 | "and must, therefore, be considered part of the dynamic menu.") |
| 1507 | ENTRY (U"The Praat menu") |
| 1508 | LIST_ITEM (U"• @@New Praat script@: creates an empty @@ScriptEditor@") |
| 1509 | LIST_ITEM (U"• @@New Praat notebook@: creates an empty @@NotebookEditor@") |
| 1510 | LIST_ITEM (U"• @@Open Praat script...@: creates a @@ScriptEditor@ with a script from disk") |
| 1511 | LIST_ITEM (U"• @@Open Praat notebook...@: creates a @@NotebookEditor@ with a notebook from disk") |
| 1512 | LIST_ITEM (U"• The ##Goodies submenu#: for doing things (like using the Calculator) " |
| 1513 | "that do not create new objects and do not depend on the kinds of selected objects.") |
| 1514 | LIST_ITEM (U"• The ##Settings submenu#: for program-wide preferences, " |
| 1515 | "like audio input and output settings.") |
| 1516 | LIST_ITEM (U"• ##Buttons...#: raises a @@ButtonEditor@") |
| 1517 | LIST_ITEM (U"• (@@Add menu command...@)") |
| 1518 | LIST_ITEM (U"• (@@Add action command...@)") |
| 1519 | LIST_ITEM (U"• @@Quit") |
| 1520 | ENTRY (U"Other menus") |
| 1521 | LIST_ITEM (U"• The @@New menu@: for creating objects from scratch.") |
| 1522 | LIST_ITEM (U"• The @@Open menu@: for reading objects from file into memory.") |
| 1523 | LIST_ITEM (U"• The @@Save menu@: for writing objects from memory to file.") |
| 1524 | LIST_ITEM (U"• The ##Help menu#: for viewing the manual.") |
| 1525 | MAN_END |
| 1526 | |
| 1527 | MAN_BEGIN (U"Periodicity menu", U"ppgb", 20240722 /*20010417, 20231115*/) |
| 1528 | INTRO (U"A menu that occurs in the @@Dynamic menu@ for a @Sound.") |
| 1529 | NORMAL (U"This menu contains commands for analysing the pitch contour of the selected Sound:") |
| 1530 | LIST_ITEM (U"@@Sound: To Pitch (filtered autocorrelation)...") |
| 1531 | LIST_ITEM (U"@@Sound: To Pitch (raw cross-correlation)...") |
| 1532 | LIST_ITEM (U"@@Sound: To Pitch (raw autocorrelation)...") |
| 1533 | LIST_ITEM (U"@@Sound: To Pitch (filtered cross-correlation)...") |
| 1534 | LIST_ITEM (U"@@Sound: To Pitch (shs)...") |
| 1535 | LIST_ITEM (U"@@Sound: To Harmonicity (cc)...") |
| 1536 | LIST_ITEM (U"@@Sound: To Harmonicity (ac)...") |
| 1537 | MAN_END |
| 1538 | |
| 1539 | MAN_BEGIN (U"Pitch menu", U"ppgb", 20221202) |
| 1540 | INTRO (U"A menu in the @SoundEditor or @TextGridEditor.") |
| 1541 | MAN_END |
| 1542 | |
| 1543 | MAN_BEGIN (U"Play", U"ppgb", /*20021212*/ 20220814) |
| 1544 | INTRO (U"A command that is available if you select a @Sound, @Pitch, or @PointProcess object. " |
| 1545 | "It gives you an acoustic representation of the selected object, if your loudspeakers are on " |
| 1546 | "and you did not \"mute\" your computer sound system.") |
| 1547 | NORMAL (U"A Play button is also available in the @SoundRecorder window " |
| 1548 | "and in the @Play menu of the @SoundEditor or @TextGridEditor. In the editors, " |
| 1549 | "you will usually play a sound by clicking on any of the rectangles around the data.") |
| 1550 | MAN_END |
| 1551 | |
| 1552 | MAN_BEGIN (U"Query submenu", U"ppgb", 20221202) |
| 1553 | INTRO (U"A submenu that appears in the @@Objects window@ if you select an object of almost any type.") |
| 1554 | INTRO (U"Query commands give you information about objects.") |
| 1555 | NORMAL (U"Most query commands start with the word #%Get or sometimes the word #%Count. " |
| 1556 | "You will find these commands in two places: under the @@Query submenu@ that usually appears if you " |
| 1557 | "select an @@Objects|object@ in the list, and in the query parts of several menus of the @editors " |
| 1558 | "(such as the @@Pitch menu@, the @@Formants menu@ or the @@Spectrogram menu@.") |
| 1559 | ENTRY (U"Behaviour") |
| 1560 | NORMAL (U"If you click a query command, the answer will be written to the @@Info window@.") |
| 1561 | ENTRY (U"Scripting") |
| 1562 | NORMAL (U"In a script, you can still use query commands to write the information to the Info window " |
| 1563 | "but you can also use any query command to put the information into a variable. " |
| 1564 | "(see @@Scripting 6.3. Query commands@). In such a case, the value will not be written into the Info window.") |
| 1565 | ENTRY (U"Some pages that link here") |
| 1566 | ENTRY (U"Query commands in the Praat program") |
| 1567 | LIST_ITEM (U"@@FAQ: Pitch analysis") |
| 1568 | LIST_ITEM (U"@@Formulas 8. Attributes of objects") |
| 1569 | LIST_ITEM (U"@@OT learning 7. Learning from overt forms") |
| 1570 | LIST_ITEM (U"@@Script for listing F0 statistics") |
| 1571 | LIST_ITEM (U"@@Scripting 3.3. Numeric queries") |
| 1572 | LIST_ITEM (U"@@Scripting 3.5. String queries") |
| 1573 | LIST_ITEM (U"@@Scripting 6.2. Writing to the Info window") |
| 1574 | LIST_ITEM (U"@@time domain") |
| 1575 | LIST_ITEM (U"@@Voice 6. Automating voice analysis with a script") |
| 1576 | NORMAL (U"The Praat program contains at least the following query commands:") |
| 1577 | MAN_END |
| 1578 | |
| 1579 | MAN_BEGIN (U"Quit", U"ppgb", 20050822) |
| 1580 | INTRO (U"One of the commands in the @@Praat menu@.") |
| 1581 | ENTRY (U"Purpose") |
| 1582 | NORMAL (U"To leave the program.") |
| 1583 | ENTRY (U"Behaviour") |
| 1584 | NORMAL (U"All @objects not written to a file will be lost. " |
| 1585 | "However, file-based objects (like large lexica) will be saved correctly.") |
| 1586 | ENTRY (U"Usage") |
| 1587 | NORMAL (U"To save your data to a disk file before quitting, choose a command from the @@Save menu@.") |
| 1588 | MAN_END |
| 1589 | |
| 1590 | MAN_BEGIN (U"Read from file...", U"ppgb", 20111018) |
| 1591 | INTRO (U"One of the commands in the @@Open menu@.") |
| 1592 | ENTRY (U"Purpose") |
| 1593 | NORMAL (U"To read one or more @objects from a file on disk.") |
| 1594 | ENTRY (U"Behaviour") |
| 1595 | NORMAL (U"Many kinds of files are recognized:") |
| 1596 | LIST_ITEM (U"1. Text files that are structured as described under @@Save as text file...@; " |
| 1597 | "these can contain an object of any type, or a collection of objects.") |
| 1598 | LIST_ITEM (U"2. Files that were produced by @@Save as binary file...@ (any type).") |
| 1599 | LIST_ITEM (U"3. Files in a LISP text format (only for object types that can be written to a LISP file).") |
| 1600 | LIST_ITEM (U"4. Files that were made recognizable by the libraries built on Praat. " |
| 1601 | "For instance, the phonetics library adds recognizers for many kinds of sound files.") |
| 1602 | NORMAL (U"If the file contains more than one object, these objects will appear in the list, " |
| 1603 | "and their names will be the same as the names that they had " |
| 1604 | "when they were saved with ##Save as text file...# or ##Save as binary file...#.") |
| 1605 | ENTRY (U"Examples") |
| 1606 | LIST_ITEM (U"• If the file contains only one Pitch object and is called \"hallo.pit\", " |
| 1607 | "an object with the name \"Pitch hallo\" will appear in the list of objects. " |
| 1608 | "You may have more objects with the same name.") |
| 1609 | LIST_ITEM (U"• If the file contains one object of type Pitch, named \"hallo\", " |
| 1610 | "and one object of type Polygon, named \"kromme\", " |
| 1611 | "there will appear two objects in the list, " |
| 1612 | "called \"Pitch hallo\" and \"Polygon kromme\".") |
| 1613 | MAN_END |
| 1614 | |
| 1615 | MAN_BEGIN (U"Open menu", U"ppgb", 20110111) |
| 1616 | INTRO (U"One of the menus in the @@Objects window@.") |
| 1617 | NORMAL (U"With the Open menu, you read one or more @objects from a file on disk into memory. " |
| 1618 | "The resulting object(s) will appear in the @@List of Objects@.") |
| 1619 | NORMAL (U"The Open menu contains the command @@Read from file...@, which recognizes most file types, " |
| 1620 | "and perhaps several other commands for reading unrecognizable file types (e.g., raw sound data), " |
| 1621 | "or for interpreting known file types in a different way " |
| 1622 | "(e.g., reading two mono sounds from one stereo sound file):") |
| 1623 | MAN_END |
| 1624 | |
| 1625 | MAN_BEGIN (U"pause window", U"ppgb", 20230723) |
| 1626 | INTRO (U"A window, popped up by a script, that asks the user for input.") |
| 1627 | NORMAL (U"For details, see @@Scripting 6.6. Controlling the user@.") |
| 1628 | MAN_END |
| 1629 | |
| 1630 | MAN_BEGIN (U"Remove", U"ppgb", 20021212) |
| 1631 | INTRO (U"One of the fixed buttons in the @@Objects window@.") |
| 1632 | NORMAL (U"You can choose this command after selecting one or more @objects in the list.") |
| 1633 | NORMAL (U"The selected objects will permanently disappear from the list, " |
| 1634 | "and the computer memory that they occupied will be freed.") |
| 1635 | NORMAL (U"To save your data before removing, choose a command from the @@Save menu@.") |
| 1636 | MAN_END |
| 1637 | |
| 1638 | MAN_BEGIN (U"Rename...", U"ppgb", 20111018) |
| 1639 | INTRO (U"One of the fixed buttons in the @@Objects window@.") |
| 1640 | ENTRY (U"Availability") |
| 1641 | NORMAL (U"You can choose this command after selecting one object of any type.") |
| 1642 | ENTRY (U"Purpose") |
| 1643 | NORMAL (U"You can give the selected object a new name.") |
| 1644 | ENTRY (U"Behaviour") |
| 1645 | NORMAL (U"If you type special symbols or spaces, the Objects window will replace them with underscores.") |
| 1646 | MAN_END |
| 1647 | |
| 1648 | MAN_BEGIN (U"Save menu", U"ppgb", 20211015) |
| 1649 | INTRO (U"One of the menus in the @@Objects window@.") |
| 1650 | ENTRY (U"Purpose") |
| 1651 | NORMAL (U"With the #Save menu, you write one or more selected @objects from memory to a file on disk. " |
| 1652 | "The data can be read in again with one of the commands in the @@Open menu@ " |
| 1653 | "(most often simply with @@Read from file...@).") |
| 1654 | ENTRY (U"Usage: save your work") |
| 1655 | NORMAL (U"You will often choose a command from this menu just before clicking the @Remove button " |
| 1656 | "or choosing the @Quit command.") |
| 1657 | ENTRY (U"Fixed commands") |
| 1658 | NORMAL (U"If no object is selected, the #Save menu is empty. " |
| 1659 | "If any object is selected, it will at least contain the following commands:") |
| 1660 | LIST_ITEM (U"• @@Save as text file...") |
| 1661 | LIST_ITEM (U"• @@Save as short text file...") |
| 1662 | LIST_ITEM (U"• @@Save as binary file...") |
| 1663 | ENTRY (U"Dynamic commands") |
| 1664 | NORMAL (U"Depending on the type of the selected object, the following commands may be available " |
| 1665 | "in the #Save menu:") |
| 1666 | MAN_END |
| 1667 | |
| 1668 | MAN_BEGIN (U"Save as binary file...", U"ppgb", 20110129) |
| 1669 | INTRO (U"One of the commands in the @@Save menu@.") |
| 1670 | ENTRY (U"Availability") |
| 1671 | NORMAL (U"You can choose this command after selecting one or more @objects.") |
| 1672 | ENTRY (U"Behaviour") |
| 1673 | NORMAL (U"The Objects window will ask you for a file name. " |
| 1674 | "After you click OK, the objects will be written to a binary file on disk.") |
| 1675 | ENTRY (U"Usage") |
| 1676 | NORMAL (U"The file can be read again with @@Read from file...@.") |
| 1677 | ENTRY (U"File format") |
| 1678 | NORMAL (U"These files are in a device-independent binary format, " |
| 1679 | "and can be written and read on any machine.") |
| 1680 | MAN_END |
| 1681 | |
| 1682 | MAN_BEGIN (U"Save as short text file...", U"ppgb", 20110129) |
| 1683 | INTRO (U"One of the commands in the @@Save menu@.") |
| 1684 | ENTRY (U"Availability") |
| 1685 | NORMAL (U"You can choose this command after selecting one or more @objects.") |
| 1686 | ENTRY (U"Behaviour") |
| 1687 | NORMAL (U"The Objects window will ask you for a file name. " |
| 1688 | "After you click OK, the objects will be written to a text file on disk.") |
| 1689 | ENTRY (U"File format") |
| 1690 | NORMAL (U"The format is much shorter than the one described at @@Save as text file...@. " |
| 1691 | "Most of the comments are gone, and there is normally one piece of data per line.") |
| 1692 | NORMAL (U"The file can be read again with the all-purpose @@Read from file...@.") |
| 1693 | MAN_END |
| 1694 | |
| 1695 | MAN_BEGIN (U"Save as text file...", U"ppgb", 20110129) |
| 1696 | INTRO (U"One of the commands in the @@Save menu@.") |
| 1697 | ENTRY (U"Availability") |
| 1698 | NORMAL (U"You can choose this command after selecting one or more @objects.") |
| 1699 | ENTRY (U"Behaviour") |
| 1700 | NORMAL (U"The Objects window will ask you for a file name. " |
| 1701 | "After you click OK, the objects will be written to a text file on disk.") |
| 1702 | ENTRY (U"File format") |
| 1703 | NORMAL (U"If you selected a single object, e.g., of type Pitch, " |
| 1704 | "the file will start with the lines:") |
| 1705 | CODE (U"File type = \"ooTextFile\"") |
| 1706 | CODE (U"Object class = \"Pitch\"") |
| 1707 | NORMAL (U"After this, the pitch data will follow.") |
| 1708 | LIST_ITEM (U"If you selected more than one object, e.g., “Pitch hallo” and “Polygon kromme”, " |
| 1709 | "the file will look like:") |
| 1710 | CODE (U"File type = \"ooTextFile\"") |
| 1711 | CODE (U"Object class = \"Collection\"") |
| 1712 | CODE (U"size = 2") |
| 1713 | CODE (U"item []:") |
| 1714 | CODE (U" item [1]:") |
| 1715 | CODE (U" class = \"Pitch\"") |
| 1716 | CODE (U" name = \"hallo\"") |
| 1717 | CODE (U" (pitch data...)") |
| 1718 | CODE (U" item [2]:") |
| 1719 | CODE (U" class = \"Polygon\"") |
| 1720 | CODE (U" name = \"kromme\"") |
| 1721 | CODE (U" (polygon data...)") |
| 1722 | NORMAL (U"The file can be read again with @@Read from file...@, " |
| 1723 | "which, by the way, does not need the verbosity of the above example. " |
| 1724 | "The following minimal format will also be read correctly:") |
| 1725 | CODE (U"\"ooTextFile\"") |
| 1726 | CODE (U"\"Collection\" 2") |
| 1727 | CODE (U"\"Pitch\" \"hallo\" (pitch data...)") |
| 1728 | CODE (U"\"Polygon\" \"kromme\" (polygon data...)") |
| 1729 | NORMAL (U"Thus, all text that is not a free-standing number and is not enclosed in double quotes or < >, " |
| 1730 | "is considered a comment, as is all text following an exclamation mark (“!”) on the same line.") |
| 1731 | MAN_END |
| 1732 | |
| 1733 | MAN_BEGIN (U"Segmentation", U"ppgb", 20010408) |
| 1734 | INTRO (U"See @@Intro 7. Annotation@.") |
| 1735 | MAN_END |
| 1736 | |
| 1737 | MAN_BEGIN (U"Show formant", U"ppgb", 20030316) |
| 1738 | INTRO (U"One of the commands in the Formant menu of the @SoundEditor and the @TextGridEditor.") |
| 1739 | NORMAL (U"See @@Intro 5. Formant analysis@.") |
| 1740 | MAN_END |
| 1741 | |
| 1742 | MAN_BEGIN (U"Show intensity", U"ppgb", 20030316) |
| 1743 | INTRO (U"One of the commands in the Intensity menu of the @SoundEditor and the @TextGridEditor.") |
| 1744 | NORMAL (U"See @@Intro 6. Intensity analysis@.") |
| 1745 | MAN_END |
| 1746 | |
| 1747 | MAN_BEGIN (U"Show pitch", U"ppgb", 20030316) |
| 1748 | INTRO (U"One of the commands in the Pitch menu of the @SoundEditor and the @TextGridEditor.") |
| 1749 | NORMAL (U"See @@Intro 4. Pitch analysis@.") |
| 1750 | MAN_END |
| 1751 | |
| 1752 | MAN_BEGIN (U"Show pulses", U"ppgb", 20030316) |
| 1753 | INTRO (U"One of the commands in the Pulses menu of the @SoundEditor and the @TextGridEditor.") |
| 1754 | NORMAL (U"See @Voice.") |
| 1755 | MAN_END |
| 1756 | |
| 1757 | MAN_BEGIN (U"Show spectrogram", U"ppgb", 20030316) |
| 1758 | INTRO (U"One of the commands in the Spectrogram menu of the @SoundEditor and the @TextGridEditor.") |
| 1759 | NORMAL (U"See @@Intro 3. Spectral analysis@.") |
| 1760 | MAN_END |
| 1761 | |
| 1762 | MAN_PAGES_BEGIN |
| 1763 | R"~~~( |
| 1764 | ################################################################################ |
| 1765 | "Source-filter synthesis" |
| 1766 | © Paul Boersma 2005-07-13 |
| 1767 | |
| 1768 | This tutorial describes how you can do acoustic synthesis with Praat. |
| 1769 | It assumes that you are familiar with the @Intro. |
| 1770 | |
| 1771 | 1. The source-filter theory of speech production |
| 1772 | ====================================== |
| 1773 | |
| 1774 | The source-filter theory (@@Fant (1960)|Fant 1960@) hypothesizes that an acoustic speech signal can be seen |
| 1775 | as a %source signal (the glottal source, or noise generated at a constriction in the vocal tract), |
| 1776 | %filtered with the resonances in the cavities of the vocal tract downstream from the glottis |
| 1777 | or the constriction. The %%Klatt synthesizer% (@@Klatt & Klatt (1990)|Klatt & Klatt 1990@), for instance, |
| 1778 | is based on this idea. |
| 1779 | |
| 1780 | In the Praat program, you can create a %source signal from scratch of from an existing |
| 1781 | speech signal, and you can create a %filter from scratch or extract it from an existing speech signal. |
| 1782 | You can manipulate (change, adapt) both the source and the filter before doing |
| 1783 | the actual synthesis, which combines the two. |
| 1784 | |
| 1785 | , @@Source-filter synthesis 1. Creating a source from pitch targets |
| 1786 | , @@Source-filter synthesis 2. Filtering a source |
| 1787 | , @@Source-filter synthesis 3. The ba-da continuum |
| 1788 | , @@Source-filter synthesis 4. Using existing sounds |
| 1789 | |
| 1790 | ################################################################################ |
| 1791 | "Source-filter synthesis 1. Creating a source from pitch targets" |
| 1792 | © Paul Boersma 2014-04-21 |
| 1793 | |
| 1794 | Creating a glottal source signal for speech synthesis involves creating a @PointProcess, |
| 1795 | which is a series of time points that should represent the exact moments of glottal closure. |
| 1796 | |
| 1797 | You may want to start with creating a well-defined pitch contour. |
| 1798 | Suppose you want to create a sound with a duration of half a second with a pitch that falls from 300 to 200 Hz |
| 1799 | during that time. You first create an empty @PitchTier by choosing @@Create PitchTier...@ from the #New menu |
| 1800 | (I call this PitchTier “empty” because it does not contain any pitch information yet); |
| 1801 | you may want to name the PitchTier “source” and have it start at 0 seconds and end at 0.5 seconds. |
| 1802 | Once the PitchTier exists and is selected, you can ##View & Edit# it to add pitch points (pitch targets) to it at certain times |
| 1803 | (or you choose @@PitchTier: Add point...@ from the #Modify menu repeatedly). |
| 1804 | You could add a pitch point of 150 Hz at time 0.0 and a pitch point of 100 Hz at time 0.5. |
| 1805 | In the PitchTier window, you can see that the pitch curve falls linearly |
| 1806 | from 150 to 100 Hz during its time domain: |
| 1807 | {- 4.5x2.5 |
| 1808 | Create PitchTier: “source”, 0, 0.5 |
| 1809 | Add point: 0.0, 150 |
| 1810 | Add point: 0.5, 100 |
| 1811 | Draw: 0, 0, 0, 200, “yes”, “lines and speckles” |
| 1812 | Text top: “no”, ~%%An F0 linearly falling between two points |
| 1813 | One mark left: 100, “yes”, “yes”, “no”, “” |
| 1814 | Remove |
| 1815 | } |
| 1816 | |
| 1817 | You can hear the falling pitch by clicking on the rectangles in the PitchTier window |
| 1818 | (or by clicking ##Play pulses#, #Hum, or ##Play sine# in the Objects window). |
| 1819 | |
| 1820 | From this PitchTier, you can create a @PointProcess with @@PitchTier: To PointProcess@. |
| 1821 | The resulting PointProcess now represents a series of glottal pulses. To make some parts of this |
| 1822 | point process voiceless, you can use @@PointProcess: Remove points between...@. |
| 1823 | It is advisable to make the very beginning and end of this point process voiceless, so that the filtered sound |
| 1824 | will not start or end abruptly. In the following example, the first and last 20 ms are devoiced, |
| 1825 | and a stretch of 70 ms in the middle |
| 1826 | is made voiceless as well, perhaps because you want to simulate a voiceless plosive there: |
| 1827 | {- 4.5x2.5 |
| 1828 | pitchTier = Create PitchTier: “source”, 0, 0.5 |
| 1829 | Add point: 0.0, 150 |
| 1830 | Add point: 0.5, 100 |
| 1831 | pulses = To PointProcess |
| 1832 | Remove points between: 0, 0.02 |
| 1833 | Remove points between: 0.24, 0.31 |
| 1834 | Remove points between: 0.48, 0.5 |
| 1835 | Draw: 0, 0, “yes” |
| 1836 | Text top: “no”, ~%%The times of the glottal pulses |
| 1837 | One mark bottom: 0.24, “yes”, “yes”, “no”, “” |
| 1838 | One mark bottom: 0.31, “yes”, “yes”, “no”, “” |
| 1839 | removeObject: pitchTier, pulses |
| 1840 | } |
| 1841 | |
| 1842 | Now that we have a glottal point process (a glottal pulse train), the only thing left |
| 1843 | is to turn it into a sound by choosing @@PointProcess: To Sound (phonation)...@. |
| 1844 | If you use the standard settings of this command (but with ##Adaptation factor# set to 0.6), the result will be a @Sound with |
| 1845 | reasonable glottal flow derivatives centred around each of the original pulses in the point process. |
| 1846 | You can check this by selecting the Sound and choosing ##View & Edit#: |
| 1847 | {- 4.5x2.5 |
| 1848 | pitchTier = Create PitchTier: “source”, 0, 0.5 |
| 1849 | Add point: 0.0, 150 |
| 1850 | Add point: 0.5, 100 |
| 1851 | pulses = To PointProcess |
| 1852 | Remove points between: 0, 0.02 |
| 1853 | Remove points between: 0.24, 0.31 |
| 1854 | Remove points between: 0.48, 0.5 |
| 1855 | source = To Sound (phonation): 44100, 0.6, 0.05, 0.7, 0.03, 3.0, 4.0 |
| 1856 | Draw: 0, 0, 0, 0, “yes”, “curve” |
| 1857 | Text top: “no”, ~%%The source waveform |
| 1858 | One mark bottom: 0.24, “yes”, “yes”, “no”, “” |
| 1859 | One mark bottom: 0.31, “yes”, “yes”, “no”, “” |
| 1860 | removeObject: pitchTier, pulses, source |
| 1861 | } |
| 1862 | |
| 1863 | You will also see that the amplitude of the first two glottal wave shapes of every voiced stretch |
| 1864 | is (realistically) somewhat smaller than the amplitudes of the following wave shapes; |
| 1865 | This is the result of setting ##Adaptation factor# to 0.6. |
| 1866 | |
| 1867 | What you have now is what we call a %%glottal source signal%. It does two things: it contains information on the glottal flow, |
| 1868 | and it already takes into account one aspect of the %filter, namely the radiation at the lips. |
| 1869 | This combination is standard procedure in acoustic synthesis. |
| 1870 | |
| 1871 | The glottal source signal sounds as a voice without a vocal tract. |
| 1872 | The following section describes how you add vocal-tract resonances, i.e. the %filter. |
| 1873 | |
| 1874 | Automation |
| 1875 | ========== |
| 1876 | |
| 1877 | In a clean Praat script, the procedure described above will look as follows: |
| 1878 | { |
| 1879 | pitchTier = Create PitchTier: “source”, 0, 0.5 |
| 1880 | Add point: 0.0, 150 |
| 1881 | Add point: 0.5, 100 |
| 1882 | pulses = To PointProcess |
| 1883 | Remove points between: 0, 0.02 |
| 1884 | Remove points between: 0.24, 0.31 |
| 1885 | Remove points between: 0.48, 0.5 |
| 1886 | source = To Sound (phonation): 44100, 0.6, 0.05, 0.7, 0.03, 3.0, 4.0 |
| 1887 | removeObject: pitchTier, pulses |
| 1888 | selectObject: source |
| 1889 | } |
| 1890 | |
| 1891 | ################################################################################ |
| 1892 | "Source-filter synthesis 2. Filtering a source" |
| 1893 | © Paul Boersma 2014-04-21 |
| 1894 | |
| 1895 | Once you have a glottal source signal, you are ready to create a filter that represents |
| 1896 | the resonances of the vocal tract, as a function of time. In other words, you create a @FormantGrid object. |
| 1897 | |
| 1898 | For a vowel spoken by an average (i.e. adult female) human voice, tradition assumes five formants in the range |
| 1899 | between 0 and 5500 hertz. This number comes from a computation of the formants of a |
| 1900 | straight tube, which has resonances at wavelengths of four tube lengths, four thirds of a tube length, |
| 1901 | four fifths, and so on. For a straight tube 16 centimetres long, the shortest wavelength is 64 cm, |
| 1902 | which, with a sound velocity of 352 m/s, means a resonance frequency of 352/0.64 = 550 hertz. |
| 1903 | The other resonances will be at 1650, 2750, 3850, and 4950 hertz. |
| 1904 | |
| 1905 | You can create a @FormantGrid object with @@Create FormantGrid...@ from the #New menu (submenu #Tiers): |
| 1906 | { |
| 1907 | Create FormantGrid: “filter”, 0, 0.5, 10, 550, 1100, 60, 50 |
| 1908 | } |
| 1909 | This creates a FormantGrid with 10 formants and a single frequency value for each formant: %F_1 is 550 Hz |
| 1910 | and the higher formants are spaced 1100 Hz apart, i.e., they are |
| 1911 | 1650, 2750, 3850, 4950, 6050, 7150, 8250, 9350, and 10450 hertz; |
| 1912 | the ten bandwidths start at 60 Hz and have a spacing of 50 Hz, |
| 1913 | i.e., they are 60, 110, 160, 210, 260, 310, 360, 410, 460, and 510 hertz. |
| 1914 | |
| 1915 | You can then create formant contours with @@FormantGrid: Add formant point...@: |
| 1916 | { |
| 1917 | Remove formant points between: 1, 0, 0.5 |
| 1918 | Add formant point: 1, 0.00, 100 |
| 1919 | Add formant point: 1, 0.05, 700 |
| 1920 | Remove formant points between: 2, 0, 0.5 |
| 1921 | Add formant point: 2, 0.00, 500 |
| 1922 | Add formant point: 2, 0.05, 1100 |
| 1923 | } |
| 1924 | This example creates a spectral specification whose %F_1 rises from 100 to 700 hertz during the |
| 1925 | first 50 milliseconds (as for any obstruent), and whose %F_2 rises from 500 to 1100 hertz. |
| 1926 | The other eight formants keep their original values, as do the ten bandwidths. |
| 1927 | The resulting sound may be a [ba]-like formant transition. |
| 1928 | |
| 1929 | To get the final acoustic result (the sound), you select the glottal source signal |
| 1930 | together with the FormantGrid and choose @@Sound & FormantGrid: Filter@. |
| 1931 | |
| 1932 | The resulting sound will have a fairly straight intensity contour. You can change this with |
| 1933 | the #Formula command (@@Sound: Formula...@), or by multiplying the source signal or the |
| 1934 | acoustic result with an @Intensity or @IntensityTier object. |
| 1935 | |
| 1936 | ################################################################################ |
| 1937 | "Source-filter synthesis 3. The ba-da continuum" |
| 1938 | © Paul Boersma 2014-04-21,2025 |
| 1939 | |
| 1940 | As an example, we are going to create a male [ba]-[da] continuum in six steps. The acoustic difference |
| 1941 | between [ba] and [da] is the initial %F_2, which is 500 Hz for [ba], and 2500 Hz for [da]. |
| 1942 | |
| 1943 | We use the same @PitchTier throughout, to model a falling intonation contour: |
| 1944 | { |
| 1945 | Create PitchTier: “f0”, 0.00, 0.50 |
| 1946 | Add point: 0.00, 150 |
| 1947 | Add point: 0.50, 100 |
| 1948 | } |
| 1949 | |
| 1950 | The first and last 50 milliseconds are voiceless: |
| 1951 | { |
| 1952 | To PointProcess |
| 1953 | Remove points between: 0.00, 0.05 |
| 1954 | Remove points between: 0.45, 0.50 |
| 1955 | } |
| 1956 | |
| 1957 | Generate the glottal source signal: |
| 1958 | { |
| 1959 | To Sound (phonation): 44100, 0.6, 0.05, 0.7, 0.03, 3.0, 4.0 |
| 1960 | } |
| 1961 | |
| 1962 | During the labial or coronal closure, the sound is almost silent, so we use an @IntensityTier |
| 1963 | that models this: |
| 1964 | { |
| 1965 | Create IntensityTier: “intens”, 0.00, 0.50 |
| 1966 | Add point: 0.05, 60 |
| 1967 | Add point: 0.10, 80 |
| 1968 | } |
| 1969 | |
| 1970 | Generate the source signal: |
| 1971 | { |
| 1972 | plusObject: “Sound f0” |
| 1973 | Multiply |
| 1974 | Rename: “source” |
| 1975 | } |
| 1976 | |
| 1977 | The ten sounds are generated in a loop: |
| 1978 | { |
| 1979 | for i from 1 to 10 |
| 1980 | f2_locus = 500 + (2500/9) * (i - 1) ; variable names start with lower case! |
| 1981 | Create FormantGrid: “filter”, 0.0, 0.5, 9, 800, 1000, 60, 80 |
| 1982 | Add formant point: 1, 0.05, 100 |
| 1983 | Add bandwidth point: 1, 0.05, 50 |
| 1984 | Add formant point: 1, 0.10, 800 |
| 1985 | Add bandwidth point: 1, 0.10, 60 |
| 1986 | Add formant point: 2, 0.05, f2_locus |
| 1987 | Add bandwidth point: 2, 0.05, 100 |
| 1988 | Add formant point: 2, 0.05, 1800 |
| 1989 | Add bandwidth point: 2, 0.05, 140 |
| 1990 | plusObject: “Sound source” |
| 1991 | Filter (no scale) |
| 1992 | Rename: “bada” + string$ (i) |
| 1993 | removeObject: “FormantGrid filter” |
| 1994 | endfor |
| 1995 | } |
| 1996 | |
| 1997 | Clean up: |
| 1998 | { |
| 1999 | removeObject: “Sound source”, “Sound f0”, “IntensityTier intens”, |
| 2000 | ... “PointProcess f0”, “PitchTier f0” |
| 2001 | } |
| 2002 | |
| 2003 | In this example, filtering was done without automatic scaling, so that |
| 2004 | the resulting signals have equal intensities in the areas where they have |
| 2005 | equal formants. You will probably want to multiply all these signals with |
| 2006 | the same value in order to bring their amplitudes in a suitable range |
| 2007 | between -1 and +1 Pascal. |
| 2008 | |
| 2009 | ################################################################################ |
| 2010 | "Source-filter synthesis 4. Using existing sounds" |
| 2011 | © Paul Boersma 2017-08-28 |
| 2012 | |
| 2013 | 1. How to extract the %filter from an existing speech sound |
| 2014 | ====================================== |
| 2015 | |
| 2016 | You can separate source and filter with the help of the technique of %%linear prediction% |
| 2017 | (see @@Sound: LPC analysis@). This technique tries to approximate a given frequency spectrum with |
| 2018 | a small number of peaks, for which it finds the mid frequencies and the bandwidths. |
| 2019 | If we do this for an overlapping sequence of windowed parts of a sound signal |
| 2020 | (i.e. a %%short-term analysis%), we get a quasi-stationary approximation of the signal's |
| 2021 | spectral characteristics as a function of time, i.e. a smoothed version of the @Spectrogram. |
| 2022 | |
| 2023 | For a speech signal, the peaks are identified with the resonances (%formants) of the vocal tract. |
| 2024 | Since the spectrum of a vowel spoken by an average human being falls off with approximately |
| 2025 | 6 dB per octave, %%pre-emphasis% is applied to the signal before the linear-prediction analysis, |
| 2026 | so that the algorithm will not try to match only the lower parts of the spectrum. |
| 2027 | |
| 2028 | For an adult female human voice, tradition assumes five formants in the range |
| 2029 | between 0 and 5500 hertz, say at 550, 1650, 2750, 3850, and 4950 hertz. For the linear prediction in |
| 2030 | Praat, you will have to implement this 5500-Hz band-limiting by resampling the original |
| 2031 | speech signal to 11 kHz. For a male voice, you would use 10 kHz; for a young child, 20 kHz. |
| 2032 | |
| 2033 | To perform the resampling, you use @@Sound: Resample...@: |
| 2034 | you select a @Sound object, and click ##Resample...#. |
| 2035 | In the rest of this tutorial, I will use the syntax that you would use in a script, |
| 2036 | though you will usually do these things by clicking on objects and buttons. Thus: |
| 2037 | {; |
| 2038 | selectObject: “Sound hallo” |
| 2039 | Resample: 11000, 50 |
| 2040 | } |
| 2041 | You can then perform a linear-prediction analysis on the resampled sound |
| 2042 | with @@Sound: To LPC (burg)...@: |
| 2043 | {; |
| 2044 | selectObject: “Sound hallo_11000” |
| 2045 | To LPC (burg): 10, 0.025, 0.005, 50 |
| 2046 | } |
| 2047 | This says that your analysis is done with 10 linear-prediction parameters |
| 2048 | (which will yield at most five formant-bandwidth pairs), with an analysis window |
| 2049 | effectively 25 milliseconds long, with time steps of 5 milliseconds (so that the windows |
| 2050 | will appreciably overlap), and with a pre-emphasis frequency of 50 Hz (which is the point |
| 2051 | above which the sound will be amplified by 6 dB/octave prior to the analysis proper). |
| 2052 | |
| 2053 | As a result, an object called “LPC hallo” will appear in the list of objects. |
| 2054 | This @LPC object is a time function with 10 %%linear-prediction coefficients% in each %%time frame%. |
| 2055 | These coefficients are rather opaque even to the expert (try to view them with @Inspect), |
| 2056 | but they are the raw material from which formant and bandwidth values can be computed. |
| 2057 | To see the smoothed @Spectrogram associated with the LPC object, choose @@LPC: To Spectrogram...@: |
| 2058 | {; |
| 2059 | selectObject: “LPC hallo_11000” |
| 2060 | To Spectrogram: 20, 0, 50 |
| 2061 | Paint: 0, 0, 0, 0, 50, 0, 0, “yes” |
| 2062 | } |
| 2063 | Note that when drawing this Spectrogram, you will want to set the pre-emphasis to zero |
| 2064 | (the fifth 0 in the last line), because pre-emphasis has already been applied in the analysis. |
| 2065 | |
| 2066 | You can get and draw the formant-bandwidth pairs from the LPC object, |
| 2067 | with @@LPC: To Formant@ and @@Formant: Speckle...@: |
| 2068 | {; |
| 2069 | selectObject: “LPC hallo_11000” |
| 2070 | To Formant |
| 2071 | Speckle: 0, 0, 5500, 30, “yes” |
| 2072 | } |
| 2073 | Note that in converting the @LPC into a @Formant object, you may have lost some |
| 2074 | information about spectral peaks at very low frequencies (below 50 Hz) or at very high |
| 2075 | frequencies (near the @@Nyquist frequency@ of 5500 Hz. Such peaks usually try to fit |
| 2076 | an overall spectral slope (if the 6 dB/octave model is inappropriate), and are not seen |
| 2077 | as related with resonances in the vocal tract, so they are ignored in a formant analysis. |
| 2078 | For resynthesis purposes, they might still be important. |
| 2079 | |
| 2080 | Instead of using the intermediate LPC object, you could have done a formant analysis |
| 2081 | directly on the original Sound, with @@Sound: To Formant (burg)...@: |
| 2082 | {; |
| 2083 | selectObject: “Sound hallo” |
| 2084 | To Formant (burg): 0.005, 5, 5500, 0.025, 50 |
| 2085 | } |
| 2086 | A @Formant object has a fixed sampling (time step, frame length), and for every |
| 2087 | %%formant frame%, it contains a number of formant-bandwidth pairs. |
| 2088 | |
| 2089 | From a Formant object, you can create a @FormantGrid with @@Formant: Down to FormantGrid@. |
| 2090 | A FormantGrid object contains a number of tiers with time-stamped %%formant points% and %%bandwidth points%. |
| 2091 | |
| 2092 | Any of these three types (@LPC, @Formant, and @FormantGrid) can represent the %filter |
| 2093 | in source-filter synthesis. |
| 2094 | |
| 2095 | 2. How to extract the %source from an existing speech sound |
| 2096 | ====================================== |
| 2097 | |
| 2098 | If you are only interested in the %filter characteristics, you can get by with @Formant objects. |
| 2099 | To get at the %source signal, however, you need the raw @LPC object: |
| 2100 | you select it together with the resampled @Sound, and apply %%inverse filtering%: |
| 2101 | {; |
| 2102 | selectObject: “Sound hallo_11000”, “LPC hallo_11000” |
| 2103 | Filter (inverse) |
| 2104 | } |
| 2105 | A new Sound named `hallo_11000` will appear in the list of objects |
| 2106 | (you could rename it to `source`). |
| 2107 | This is the estimated source signal. Since the LPC analysis was designed to yield a spectrally |
| 2108 | flat filter (through the use of pre-emphasis), this source signal represents everything in the |
| 2109 | speech signal that cannot be attributed to the resonating cavities. Thus, the “source signal” |
| 2110 | will consist of the glottal volume-velocity source (with an expected spectral slope of |
| 2111 | -12 dB/octave for vowels) and the radiation characteristics at the lips, which cause a |
| 2112 | 6 dB/octave spectral rise, so that the resulting spectrum of the “source signal” |
| 2113 | is actually the %derivative of the glottal flow, with an expected spectral slope of -6 dB/octave. |
| 2114 | |
| 2115 | Note that with inverse filtering you cannot measure the actual spectral slope of the source signal. |
| 2116 | Even if the actual slope is very different from -6 dB/octave, formant extraction will try to |
| 2117 | match the pre-emphasized spectrum. Thus, by choosing a pre-emhasis of -6 dB/octave, |
| 2118 | you %impose a slope of -6 dB/octave on the source signal. |
| 2119 | |
| 2120 | 3. How to do the synthesis |
| 2121 | ========================== |
| 2122 | |
| 2123 | You can create a new Sound from a source Sound and a filter, in at least four ways. |
| 2124 | |
| 2125 | If your filter is an @LPC object, you select it and the source, and choose @@LPC & Sound: Filter...@: |
| 2126 | {; |
| 2127 | selectObject: “Sound source”, “LPC filter” |
| 2128 | Filter: “no” |
| 2129 | } |
| 2130 | If you had computed the source and filter from an LPC analysis, this procedure should give |
| 2131 | you back the original Sound, except that windowing has caused 25 milliseconds at the beginning |
| 2132 | and end of the signal to be set to zero. |
| 2133 | |
| 2134 | If your filter is a @Formant object, you select it and the source, and choose @@Sound & Formant: Filter@: |
| 2135 | {; |
| 2136 | selectObject: “Sound source”, “Formant filter” |
| 2137 | Filter |
| 2138 | } |
| 2139 | If you had computed the source and filter from an LPC analysis, this procedure will not generally give |
| 2140 | you back the original Sound, because some linear-prediction coefficients will have been ignored |
| 2141 | in the conversion to formant-bandwidth pairs. |
| 2142 | |
| 2143 | If your filter is a @FormantGrid object, you select it and the source, and choose @@Sound & FormantGrid: Filter@: |
| 2144 | {; |
| 2145 | selectObject: “Sound source”, “FormantGrid filter” |
| 2146 | Filter |
| 2147 | } |
| 2148 | Finally, you could just know the %%impulse response% of your filter (in a @Sound object). |
| 2149 | You then select both Sound objects, and choose @@Sounds: Convolve...@: |
| 2150 | {; |
| 2151 | selectObject: “Sound source”, “Sound filter” |
| 2152 | Convolve: “integral”, “zero” |
| 2153 | } |
| 2154 | As a last step, you may want to bring the resulting sound within the [-1; +1] range: |
| 2155 | {; |
| 2156 | Scale peak: 0.99 |
| 2157 | } |
| 2158 | |
| 2159 | 4. How to manipulate the filter |
| 2160 | =============================== |
| 2161 | |
| 2162 | You can hardly change the values in an @LPC object in a meaningful way: |
| 2163 | you would have to manually change its rather opaque data with the help of @Inspect. |
| 2164 | |
| 2165 | A @Formant object can be changed in a friendlier way, with @@Formant: Formula (frequencies)...@ |
| 2166 | and @@Formant: Formula (bandwidths)...@. For instance, to multiply all formant frequencies by 0.9, |
| 2167 | you do |
| 2168 | {; |
| 2169 | selectObject: “Formant filter” |
| 2170 | Formula (frequencies): “self * 0.9” |
| 2171 | } |
| 2172 | To add 200 hertz to all values of %F_2, you do |
| 2173 | {; |
| 2174 | Formula (frequencies): ~ if row = 2 then self + 200 else self fi |
| 2175 | } |
| 2176 | A @FormantGrid object can be changed by adding or removing points: |
| 2177 | , @@FormantGrid: Add formant point...@ |
| 2178 | , @@FormantGrid: Add bandwidth point...@ |
| 2179 | , @@FormantGrid: Remove formant points between...@ |
| 2180 | , @@FormantGrid: Remove bandwidth points between...@ |
| 2181 | |
| 2182 | 5. How to manipulate the source signal |
| 2183 | ====================================== |
| 2184 | |
| 2185 | You can manipulate the source signal in the same way you that would manipulate any sound, |
| 2186 | for instance with the @ManipulationEditor. |
| 2187 | |
| 2188 | )~~~" |
| 2189 | MAN_PAGES_END |
| 2190 | |
| 2191 | MAN_BEGIN (U"Spectrogram menu", U"ppgb", 20221202) |
| 2192 | INTRO (U"A menu in the @SoundEditor or @TextGridEditor.") |
| 2193 | MAN_END |
| 2194 | |
| 2195 | MAN_BEGIN (U"Spectrogram settings...", U"ppgb", 20221202) |
| 2196 | INTRO (U"A command in the @@Spectrogram menu@ of the @SoundEditor and @TextGridEditor windows. " |
| 2197 | "See @@Intro 3.2. Configuring the spectrogram@.") |
| 2198 | MAN_END |
| 2199 | |
| 2200 | MAN_BEGIN (U"Technical", U"ppgb", 20120915) |
| 2201 | INTRO (U"The title of a submenu of the @@Praat menu@.") |
| 2202 | MAN_END |
| 2203 | |
| 2204 | MAN_BEGIN (U"Types of objects", U"ppgb", 20190928) |
| 2205 | INTRO (U"Praat contains the following types of objects and @Editors. " |
| 2206 | "For an introduction and tutorials, see @Intro.") |
| 2207 | NORMAL (U"General purpose:") |
| 2208 | LIST_ITEM (U"• @Matrix: a sampled real-valued function of two variables") |
| 2209 | LIST_ITEM (U"• @Polygon") |
| 2210 | LIST_ITEM (U"• @PointProcess: a point process (@PointEditor)") |
| 2211 | LIST_ITEM (U"• @Sound: a sampled continuous process (@SoundEditor, @SoundRecorder, @@Sound files@)") |
| 2212 | LIST_ITEM (U"• @LongSound: a file-based version of a sound (@LongSoundEditor)") |
| 2213 | LIST_ITEM (U"• @Strings") |
| 2214 | LIST_ITEM (U"• @Distributions, @PairDistribution") |
| 2215 | LIST_ITEM (U"• @Table, @TableOfReal") |
| 2216 | LIST_ITEM (U"• @Permutation") |
| 2217 | LIST_ITEM (U"• @ParamCurve") |
| 2218 | NORMAL (U"Periodicity analysis:") |
| 2219 | LIST_ITEM (U"• Tutorials:") |
| 2220 | LIST_ITEM1 (U"• @@Intro 4. Pitch analysis") |
| 2221 | LIST_ITEM1 (U"• @@Intro 6. Intensity analysis") |
| 2222 | LIST_ITEM1 (U"• @Voice (jitter, shimmer, noise)") |
| 2223 | LIST_ITEM (U"• @Pitch: articulatory fundamental frequency, acoustic periodicity, or perceptual pitch (@PitchEditor)") |
| 2224 | LIST_ITEM (U"• @Harmonicity: degree of periodicity") |
| 2225 | LIST_ITEM (U"• @Intensity, @IntensityTier: intensity contour") |
| 2226 | LIST_ITEM (U"• @Electroglottogram") |
| 2227 | NORMAL (U"Spectral analysis:") |
| 2228 | LIST_ITEM (U"• Tutorials:") |
| 2229 | LIST_ITEM1 (U"• @@Intro 3. Spectral analysis") |
| 2230 | LIST_ITEM1 (U"• @@Intro 5. Formant analysis") |
| 2231 | LIST_ITEM (U"• @Spectrum: complex-valued equally spaced frequency spectrum (@SpectrumEditor)") |
| 2232 | LIST_ITEM (U"• @Ltas: long-term average spectrum") |
| 2233 | LIST_ITEM (U"• Spectro-temporal: @Spectrogram, @BarkSpectrogram, @MelSpectrogram") |
| 2234 | LIST_ITEM (U"• @Formant: acoustic formant contours") |
| 2235 | LIST_ITEM (U"• @LPC: coefficients of Linear Predictive Coding, as a function of time") |
| 2236 | LIST_ITEM (U"• @Cepstrum, @CC, @LFCC, @MFCC (cepstral coefficients)") |
| 2237 | LIST_ITEM (U"• @Excitation: excitation pattern of basilar membrane") |
| 2238 | LIST_ITEM (U"• @Excitations: an ensemble of #Excitation objects") |
| 2239 | LIST_ITEM (U"• @Cochleagram: excitation pattern as a function of time") |
| 2240 | NORMAL (U"Labelling and segmentation (see @@Intro 7. Annotation@):") |
| 2241 | LIST_ITEM (U"• @TextGrid (@TextGridEditor)") |
| 2242 | NORMAL (U"Listening experiments:") |
| 2243 | LIST_ITEM (U"• @ExperimentMFC") |
| 2244 | NORMAL (U"Manipulation of sound:") |
| 2245 | LIST_ITEM (U"• Tutorials:") |
| 2246 | LIST_ITEM1 (U"• @@Intro 8.1. Manipulation of pitch") |
| 2247 | LIST_ITEM1 (U"• @@Intro 8.2. Manipulation of duration") |
| 2248 | LIST_ITEM1 (U"• @@Intro 8.3. Manipulation of intensity") |
| 2249 | LIST_ITEM1 (U"• @@Filtering") |
| 2250 | LIST_ITEM1 (U"• @@Source-filter synthesis") |
| 2251 | LIST_ITEM (U"• @PitchTier (@PitchTierEditor)") |
| 2252 | LIST_ITEM (U"• @Manipulation (@ManipulationEditor): @@overlap-add@") |
| 2253 | LIST_ITEM (U"• @DurationTier") |
| 2254 | LIST_ITEM (U"• @FormantGrid") |
| 2255 | NORMAL (U"Articulatory synthesis (see the @@Articulatory synthesis@ tutorial):") |
| 2256 | LIST_ITEM (U"• @Speaker: speaker characteristics of a woman, a man, or a child") |
| 2257 | LIST_ITEM (U"• #Articulation: snapshot of articulatory specifications (muscle activities)") |
| 2258 | LIST_ITEM (U"• @Artword: articulatory target specifications as functions of time") |
| 2259 | LIST_ITEM (U"• (@VocalTract: area function)") |
| 2260 | NORMAL (U"Neural net package:") |
| 2261 | LIST_ITEM (U"• @FFNet: feed-forward neural net") |
| 2262 | LIST_ITEM (U"• @PatternList") |
| 2263 | LIST_ITEM (U"• @Categories: for classification (#CategoriesEditor)") |
| 2264 | NORMAL (U"Numerical and statistical analysis:") |
| 2265 | LIST_ITEM (U"• @Eigen: eigenvectors and eigenvalues") |
| 2266 | LIST_ITEM (U"• @Polynomial, @Roots, @ChebyshevSeries, @LegendreSeries, @ISpline, @MSpline") |
| 2267 | LIST_ITEM (U"• @Covariance: covariance matrix") |
| 2268 | LIST_ITEM (U"• @Confusion: confusion matrix") |
| 2269 | LIST_ITEM (U"• @@Discriminant analysis@: @Discriminant") |
| 2270 | LIST_ITEM (U"• @@Principal component analysis@: @PCA") |
| 2271 | LIST_ITEM (U"• @Correlation, @ClassificationTable, @SSCP") |
| 2272 | LIST_ITEM (U"• @DTW: dynamic time warping") |
| 2273 | NORMAL (U"@@Multidimensional scaling@:") |
| 2274 | LIST_ITEM (U"• @Configuration (@Salience)") |
| 2275 | LIST_ITEM (U"• @@Kruskal analysis@: @Dissimilarity (@Weight), @Similarity") |
| 2276 | LIST_ITEM (U"• @@INDSCAL analysis@: @Distance, @ScalarProduct") |
| 2277 | LIST_ITEM (U"• @@Correspondence analysis@: @ContingencyTable") |
| 2278 | NORMAL (U"Optimality-theoretic learning (see the @@OT learning@ tutorial)") |
| 2279 | LIST_ITEM (U"• @OTGrammar (@OTGrammarEditor)") |
| 2280 | NORMAL (U"Bureaucracy") |
| 2281 | LIST_ITEM (U"• @WordList, @SpellingChecker") |
| 2282 | MAN_END |
| 2283 | |
| 2284 | MAN_PAGES_BEGIN |
| 2285 | R"~~~( |
| 2286 | ################################################################################ |
| 2287 | "Unicode" |
| 2288 | © Paul Boersma 2023 |
| 2289 | |
| 2290 | Praat aims at being a fully international program: |
| 2291 | the texts in Praat’s TextGrids, Tables, scripts, or Info window (and elsewhere) can contain many types of characters |
| 2292 | (see @@special symbols@). |
| 2293 | For this reason, Praat saves its text files in one of two possible formats: UTF-8 (including ASCII) or UTF-16. |
| 2294 | |
| 2295 | ASCII text files |
| 2296 | ================ |
| 2297 | |
| 2298 | If your TextGrid (or Table, or script, or Info window...) contains only characters that can be encoded as ASCII, |
| 2299 | namely the characters `!\"#$%&'()*+,-./0123456789:;<=>?@ |
| 2300 | ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`` abcdefghijklmnopqrstuvwxyz{|}~`, |
| 2301 | then when you say @@Save as text file...@ or #Save, Praat will write an ASCII text file, |
| 2302 | which is a text file in which every character is encoded in a single byte (8 bits). |
| 2303 | All programs that can read plain text files can read such files produced by Praat. |
| 2304 | |
| 2305 | UTF-16 text files |
| 2306 | ================= |
| 2307 | |
| 2308 | If your TextGrid (or Table, or script, or Info window...) contains one or more characters that cannot be encoded as ASCII, |
| 2309 | for instance West-European characters such as \ao\c,\e'\o"\ss\?d, East-European characters such as \c<\l/\o:\s<\uo\z', |
| 2310 | or Hebrew characters such as \?+\B+\G+\M%\vO\sU, |
| 2311 | then when you say @@Save as text file...@ or #Save, Praat will write an UTF-16 text file, |
| 2312 | which is a text file in which every character is encoded in two bytes (and some very rare characters in four bytes). |
| 2313 | Many programs can read such text files, for instance NotePad, WordPad, Microsoft Word, and TextWrangler. |
| 2314 | |
| 2315 | What if my other programs cannot read UTF-16 text files? |
| 2316 | ======================================================== |
| 2317 | |
| 2318 | If you want to export your Table to Microsoft Excel or to SPSS, or if you want your TextGrid file to be read |
| 2319 | by somebody else's Perl script, then there will be no problem if your Table contains only ASCII characters (see above). |
| 2320 | But if your Table contains any other (i.e. non-ASCII) characters, you may be in trouble, because Praat will write the Table |
| 2321 | as an UTF-16 text file, and not all of the programs just mentioned can read such files yet. |
| 2322 | |
| 2323 | What you can do is go to ##Text writing settings...# in the #Settings submenu of the #Praat menu, |
| 2324 | and there set the output encoding to ##UTF-8#. Praat will from then on save your text files in the UTF-8 format, |
| 2325 | which means one byte for every ASCII character and 2 to 4 bytes for every non-ASCII character. |
| 2326 | Especially on Linux, many programs understand UTF-8 text and will display the correct characters. |
| 2327 | Programs such as SPSS do not understand UTF-8 but will still display ASCII characters correctly; |
| 2328 | for instance, the names München and Wałęsa may appear as M\A~\:-nchen and Wa\Ao,\A"\TMsa or so. |
| 2329 | |
| 2330 | If you can get by with West-European characters (on Windows), |
| 2331 | then you may choose ##try ISO Latin-1, then UTF-16# for the output encoding. |
| 2332 | It is possible (but not guaranteed) that programs like SPSS then display your West-European text correctly. |
| 2333 | This trick is of limited use, because it will not work if your operating system is set to a “codepage” |
| 2334 | differently from ISO Latin-1 (or “ANSI”), or if you need East-European or Hebrew characters, or if you want |
| 2335 | to share your text files with Macintosh users. |
| 2336 | |
| 2337 | If you already have some UTF-16 text files and you want to convert them to UTF-8 or ISO Latin-1 (the latter only if |
| 2338 | they do not contain non-West-European characters), then you can read them into Praat and save them again |
| 2339 | (with the appropriate output encoding setting). |
| 2340 | Other programs, such a NotePad and TextWrangler, can also do this conversion. |
| 2341 | |
| 2342 | Finally, it is still possible to make sure that all texts are ASCII, e.g. you type the characters ß and ő |
| 2343 | as “`\ss`” and “`\o:`” respectively. See @@special symbols@. |
| 2344 | |
| 2345 | ################################################################################ |
| 2346 | "Play" |
| 2347 | © Paul Boersma 2022 |
| 2348 | |
| 2349 | One of the menus in several @editors and in the @manual. |
| 2350 | ################################################################################ |
| 2351 | )~~~" |
| 2352 | MAN_PAGES_END |
| 2353 | |
| 2354 | } |
| 2355 | |
| 2356 | /* End of file manual_tutorials.cpp */ |