I want to convert text to sound file and save to system. i tried pyttsx and read this doc. but no option to save the produced sound. Then i read this answer and installed espeak. i tried this
import subprocess
def textToWav(text,file_name):
subprocess.call(["espeak",text,"-w"+file_name+".wav"])
textToWav('hello world','hello')
code. but it producing error something like not able to find subprocess espeak. But i can run GUI application of espeak now. What is the problem?