test_SpeechSynthesizer_alignment.praat 1.3 KB

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