Skip to content
Advertisement

Tag: subprocess

subprocess.call can not send stdout to ffmpeg

My code is python. It call espeak command to generate .wav audio. Then call ffmpeg to convert wav to mp3. But this command can not send stdout from espeak to ffmpeg via subprocess.call of python: The example: What is the mistake? How can I do? Answer The pipeline you wrote is handled by the shell, and won’t work (as written)

Redirected output from a subprocess call getting lost?

I have some Python code that goes roughly like this, using some libraries that you may or may not have: Basically, I’m starting a subprocess that’s supposed to go download some data for me and print it to standard out. I’m redirecting that data to a file, and then, as soon as the subprocess call returns, I’m closing my handle

Advertisement