Skip to content

Commit

Permalink
In latex_record use subprocess.call rather than os.system as this sho…
Browse files Browse the repository at this point in the history
…uld be much better.
  • Loading branch information
ajirving committed Aug 18, 2014
1 parent d891659 commit 9a38150
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions latex_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import os
import sys
import wave
import subprocess

if len (sys.argv) < 2:
print "Usage: %s <path-to-latex-document.text>" % (sys.argv[0])
Expand Down Expand Up @@ -73,9 +74,8 @@ def compileFiles (number):
startRecording = True
if line == '' or line.isspace ():
continue # ignore blank lines which produce no audio
os.system("espeak -w temp%s -s 225 '%s'" % (str(count),s.translate(line)))
subprocess.call(["espeak","-w", "temp%s" % str(count), "-s","225", s.translate(line)])
count+=1
os.system ("espeak -s 500 -p 95 'newline' -w temp%s" % str(count))
count+=1


compileFiles (count)

0 comments on commit 9a38150

Please sign in to comment.