Open vishwanath1306 opened 6 years ago
If text is passed to espeak as parameter in command line, it should be written as single "single word" or 'single word" (i.e. wrapped in in single or double quotes). This example works:
#!/usr/bin/python3
import os
phrase = "This is one sentence. This is another."
command = "espeak '"+ phrase + "'"
os.system(command)
Whenever I'm trying to talk more than the first word in my program, espeak doesn't seem to be working. I am using Python 3.6.0, and running the command. The code is as follows:
In
word
, if instead ofThe word is
, I giveThe_word_is
, it works fine.Do help me out, or suggest if some other offline library can solve this purpose.