I'm on linux, and I'm using a command called 'espeak' which reads sentences on stdin and writes phonemes on stdout. Whe I run it in a console, the output is the following
bash$ espeak -q -v mb-fr4 -s160
bonjour tout le monde # <-- I type this input, the rest is phoneme output
b 69
o~ 70 0 179 100 190
Z 60
u 76 0 230 100 213
R 60
t 91
u 75 0 213 100 204
l 60
@ 67 0 221 100 213
m 60
o~ 162 0 200 100 141
d 69
_ 291
_ 1
Now I'm trying to run the same command from python, like this
>>> from subprocess import Popen, PIPE
>>> from select import select
>>> espeak = Popen("espeak -q -v mb-fr4 -s160", shell=True, stdin = PIPE, stdout=PIPE)
>>> espeak.stdin.write("bonjour tout le monde\n")
>>> select([], [espeak.stdout], [], 3.0)
([], [], [])
that is to say, there is nothing to read on the subprocesses stdout
. I can't obtain my list of phonemes!
What can I do ? Help !