testCommandLineCalls.praat 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. form Test command line calls
  2. sentence First_text I love you
  3. real Beep_duration 0.4
  4. sentence Second_text Me too
  5. endform
  6. writeInfoLine: "She: """, first_text$, """"
  7. appendInfoLine: "He: """, second_text$, """"
  8. synth1 = Create SpeechSynthesizer: "English (Great Britain)", "Female1"
  9. Play text: first_text$
  10. Create Sound as pure tone: "beep", 1, 0.0, beep_duration,
  11. ... 44100, 440, 0.2, 0.01, 0.01
  12. Play
  13. Remove
  14. synth2 = Create SpeechSynthesizer: "English (America)", "Male1"
  15. Play text: second_text$
  16. exit
  17. Praat.exe c:\Users\pboersma\Desktop\testCommandLineCalls.praat "I love you" 0.4 Me too
  18. Praat.exe c:\Users\pboersma\Desktop\testCommandLineCalls.praat "I love you" 0.4 "Me too"
  19. import os
  20. os.system('Praat.exe c:\\Users\\pboersma\\Desktop\\testCommandLineCalls.praat "I love you" 0.4 Me too')
  21. import subprocess
  22. subprocess.call('Praat.exe c:\\Users\\pboersma\\Desktop\\testCommandLineCalls.praat "I love you" 0.4 Me too')
  23. subprocess.call(['Praat.exe', 'c:\\Users\\pboersma\\Desktop\\testCommandLineCalls.praat', 'I love you', '0.4', 'Me too'])
  24. subprocess.call(['Praat.exe', 'c:\\Users\\pboersma\\Desktop\\testCommandLineCalls.praat', 'I love you', '0.4', 'Me', 'too'])exit