MAKE TEXT TO SPEECH CONVERTER APP USING PYTHON

Veröffentlicht am: 21 Februar 2021
auf dem Kanal: Rajat Bisht
87
10

code:
"""
@author: Rajat Bisht
"""

#---------------------------importing required modules------------------------
import pyttsx3

#--------------__main__----------------------------------

converter=pyttsx3.init()
b='''type 1 to convert text to speech
type 2 to get list of voices
type 3 to change voice'''
print(b)
converter.say(b)
converter.runAndWait()


user=input("Enter your choice: ")

for m in range(5):
if user=='1':
a=input("Enter what you want to say: ")
converter.setProperty('rate',170)
converter.say(a)
converter.runAndWait()
qeu=input("Press y if you want to save it: ")
if qeu=='y':
converter.save_to_file(a,'converted.mp3')

if user=='2':
voices = converter.getProperty('voices')
for voice in voices:
to get the info. about various voices in our PC
print("Voice:")
print("ID: %s" %voice.id)
print("Name: %s" %voice.name)
print("Age: %s" %voice.age)
print("Gender: %s" %voice.gender)
print("Languages Known: %s" %voice.languages)

if user=='3':
b=input('enter voice id: ')
a=input("Enter what you want to say: ")
c=float(input('enter the speed exapmle 1x or 2x or 3x'))
d=c*100
converter.setProperty('voice', c)
converter.setProperty('rate',d)
converter.runAndWait()
qeu=input("Press y if you want to save it: ")
if qeu=='y':
converter.save_to_file(a,'converted.mp3')

#MyFirstApp, #PythonToExe #TextToSpeechUsingPython
#pyttsx3
#PythonToExe


Auf dieser Seite können Sie das Online-Video MAKE TEXT TO SPEECH CONVERTER APP USING PYTHON mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Rajat Bisht 21 Februar 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 87 Mal angesehen und es wurde von 10 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!