简体   繁体   中英

Espeak on windows 7 and python 2.7

On the begin I'll say that there is a similar post here: How to use espeak with python and I was using answers from this post, but still i'm getting errors, so maybe u'll be able to help me fix it.

import subprocess
text = '"Hello world"'
subprocess.call('espeak '+text, shell=True)

This code gives me an error:

'espeak' is not recognized as an internal or external command,
operable program or batch file.

ps. I think I installed espeak correctly, because I can use in CMD line:

espeak "text"

and it will say "text" correctly.

PS2. probably answer for this question will be the answer for my another question I posted earlier. ( How to save the output of PyTTSx to wav file )

import subprocess
subprocess.call(['ping', '127.0.0.1'], shell=True)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM