Debian Codegraph @

test/manually/testCommandLineCalls.praat

raw
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
7 writeInfoLine: "She: """, first_text$, """"
8 appendInfoLine: "He: """, second_text$, """"
9
10 synth1 = Create SpeechSynthesizer: "English (Great Britain)", "Female1"
11 Play text: first_text$
12 Create Sound as pure tone: "beep", 1, 0.0, beep_duration,
13 ... 44100, 440, 0.2, 0.01, 0.01
14 Play
15 Remove
16 synth2 = Create SpeechSynthesizer: "English (America)", "Male1"
17 Play text: second_text$
18
19 exit
20
21 Praat.exe c:\Users\pboersma\Desktop\testCommandLineCalls.praat "I love you" 0.4 Me too
22
23 Praat.exe c:\Users\pboersma\Desktop\testCommandLineCalls.praat "I love you" 0.4 "Me too"
24
25 import os
26 os.system('Praat.exe c:\\Users\\pboersma\\Desktop\\testCommandLineCalls.praat "I love you" 0.4 Me too')
27
28 import subprocess
29 subprocess.call('Praat.exe c:\\Users\\pboersma\\Desktop\\testCommandLineCalls.praat "I love you" 0.4 Me too')
30
31 subprocess.call(['Praat.exe', 'c:\\Users\\pboersma\\Desktop\\testCommandLineCalls.praat', 'I love you', '0.4', 'Me too'])
32
33 subprocess.call(['Praat.exe', 'c:\\Users\\pboersma\\Desktop\\testCommandLineCalls.praat', 'I love you', '0.4', 'Me', 'too'])exit