Computer Science, asked by danielrockers2020, 5 hours ago

How to do TEXT TO SPEECH IN PYTHON?

Answers

Answered by ZalimGudiya
1

Answer:

Text to speech in python

import subprocess.

def execute_unix(inputcommand):

p = subprocess.Popen(inputcommand, stdout=subprocess.PIPE, shell=True)

return output.

a = "Say something in natural language."

# create wav file.

# w = 'espeak -w temp.wav "%s" 2>>/dev/null' % a.

# execute_unix(w)

Explanation:

hope this helps u

Answered by GargiRana
1

Answer:

  • import subprocess.
  • def execute_unix(inputcommand):
  • p = subprocess.Popen(inputcommand, stdout=subprocess.PIPE, shell=True)
  • return output.
  • a = "Say something in natural language."
  • # create wav file.
  • # w = 'espeak -w temp.wav "%s" 2>>/dev/null' % a.
  • # execute_unix(w)
Similar questions