Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pyttsx3 save audio

# Import the required module
import pyttsx3
  
# Create a string
string = "Lorem Ipsum is simply dummy text " 
    + "of the prting and typesetting industry."
  
# Initialize the Pyttsx3 engine
engine = pyttsx3.init()
  
# We can use file extension as mp3 and wav, both will work
engine.save_to_file(string, 'speech.mp3')
  
# Wait until above command is not finished.
engine.runAndWait()
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #save #audio
ADD COMMENT
Topic
Name
4+8 =