Skip to content

Commit

Permalink
bugfix with tempfile in macos
Browse files Browse the repository at this point in the history
  • Loading branch information
Bootphon Project authored and Bootphon Project committed May 27, 2016
1 parent 49cd27b commit eec42b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phonemizer/phonemizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ def _process(self, text):
the text, as a scheme expression.
"""
with tempfile.NamedTemporaryFile('w+') as data:
with tempfile.NamedTemporaryFile() as data:
# save the text as a tempfile
data.write(text)
data.seek(0)

# the Scheme script to be send to festival
scm_script = open(self._script, 'r').read().format(data.name)

with tempfile.NamedTemporaryFile('rw+') as scm:
with tempfile.NamedTemporaryFile() as scm:
scm.write(scm_script)
scm.seek(0)

Expand Down

0 comments on commit eec42b2

Please sign in to comment.