4 from __future__
import print_function
17 if not os.path.exists(path):
18 raise AssertionError(
"File does not exist: %s" % str(path))
21 input_file =
'/tmp/hello.txt' 22 output_file = os.path.join(tempfile.mkdtemp(),
'hello.wav')
23 with open(input_file,
'w')
as f:
24 f.write(
'Hello World!')
25 cmd =
"rosrun aques_talk text2wave -o %s %s" % (output_file, input_file)
26 print(
"EXECUTING: ", cmd, file=sys.stderr)
30 output = subprocess.check_output(cmd, shell=
True)
31 except subprocess.CalledProcessError
as e:
33 print(
"AQUESTALK STATUS: %d, OUTPUT: %s" % (status, output), file=sys.stderr)
34 self.assertEqual(status, 0)
40 if __name__ ==
'__main__':
42 rostest.rosrun(
"aquestalk",
"test_aquestalk", TestAquestalk)
def assertIsFile(self, path)