How to save the output of PyTTSx to wav file

后端 未结 3 1198
迷失自我
迷失自我 2021-01-22 09:13

I\'m trying to find a solution why my code doesn\'t work properly. I used solution from Recording synthesized text-to-speech to a file in Python, and it kinda didnt worked out f

3条回答
  •  盖世英雄少女心
    2021-01-22 09:58

    Assuming you are using Python on a win os, you will need to specify the full path to the subprocess, and of course the full output file path eg;

    espeak_path = "C:/Program Files/eSpeak/command_line/espeak.exe"
    file_name = "C:/temp/test"
    subprocess.call([espeak_path,"-w"+file_name+".wav", text])
    

提交回复
热议问题