| 1 |
# test_SpeechSynthesizer_alignment.praat |
| 2 |
# djmw 20180821 |
| 3 |
|
| 4 |
appendInfoLine: "test_SpeechSynthesizer_alignment.praat" |
| 5 |
|
| 6 |
synthesizer = Create SpeechSynthesizer: "English (Great Britain)", "Female1" |
| 7 |
Speech output settings: 44100, 0.01, 1, 1, 130, "IPA" |
| 8 |
To Sound: "This is some text", "yes" |
| 9 |
sound1 = selected ("Sound") |
| 10 |
textgrid1 = selected ("TextGrid") |
| 11 |
|
| 12 |
selectObject: synthesizer |
| 13 |
Speech output settings: 44100, 0.01, 1, 1, 180, "IPA" |
| 14 |
To Sound: "This is some text", "yes" |
| 15 |
sound2 = selected ("Sound") |
| 16 |
textgrid2 = selected ("TextGrid") |
| 17 |
|
| 18 |
asserterror The domains of the Sound and the TextGrid must be equal |
| 19 |
selectObject: synthesizer, sound1, textgrid2 |
| 20 |
To TextGrid (align): 1, 1, 1, -35, 0.1, 0.1 |
| 21 |
|
| 22 |
asserterror The interval range end number should not be smaller than the interval range start number |
| 23 |
selectObject: synthesizer, sound1, textgrid1 |
| 24 |
To TextGrid (align): 1, 2, 1, -35, 0.1, 0.1 |
| 25 |
|
| 26 |
asserterror The specified interval range end number (3) exceeds the number of intervals (1) in this tier |
| 27 |
selectObject: synthesizer, sound1, textgrid1 |
| 28 |
To TextGrid (align): 1, 1, 3, -35, 0.1, 0.1 |
| 29 |
|
| 30 |
selectObject: synthesizer, sound1, textgrid1 |
| 31 |
tg = To TextGrid (align): 1, 1, 1, -40, 0.1, 0.1 |
| 32 |
|
| 33 |
|
| 34 |
removeObject: textgrid2, sound2, textgrid1, sound1, tg, synthesizer |
| 35 |
appendInfoLine: "test_SpeechSynthesizer_alignment.praat OK" |