Search
 
SCRIPT & CODE EXAMPLE
 

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()
Comment

PREVIOUS NEXT
Code Example
Python :: python icon on task bar 
Python :: convert xls to xlsx python 
Python :: extract all text from website using beautifulsoup and python 
Python :: python square a number 
Python :: python async function 
Python :: python dictionary to list 
Python :: how to install python pyautogui 
Python :: read multiple images cv2 
Python :: python package 
Python :: Creating a Pandas Data Frame Series 
Python :: add a list in python 
Python :: simple jwt 
Python :: python hasattribute 
Python :: python beginner projects 
Python :: merge two columns pandas 
Python :: numpy delete 
Python :: how to create a loading in pyqt5 
Python :: termcolor print python 
Python :: stop function python 
Python :: random.sample python 
Python :: import discord python 
Python :: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead 
Python :: discord bot delete messages python 
Python :: pandas today date 
Python :: how to stop all pygame mixer sound 
Python :: filter dict by list of keys python 
Python :: paradigm meaning in python 
Python :: read excel date in python 
Python :: how to show a progress spinner when python script is running 
Python :: destroy label tkinter 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =