Text to Speech | Akash | Abhi | Oli | Paua

pip install pyttsx3   : Python Extension Package

pip install gtts

Source-Code :

import pyttsx3
from gtts import gTTS
import os
t = pyttsx3.init()
m ="Abhijeet MF he is a fucking Asshole motherfucker,,he is a fucking PUBG player addict asshole"
language = 'en'
output = gTTS(text=m, lang=language , slow=False)
output.save("hey.mp3")


t.say("Hey You are Akash and you are father of pappu")
t.say("You are student of Science and Studying in class 11-A ")

name = input("Enter your name to get info about you -> ")
if name == "Akash" :
    t.runAndWait()

elif name == "Abhijeet" :
    os.system("Start hey.mp3")

else:
    print("Invalid name brother!")




#2 : Source-Code :



import pyttsx3
txt = pyttsx3.init()
txt1 = pyttsx3.init()
txt2 = pyttsx3.init()
oliv = pyttsx3.init()
pappu = pyttsx3.init()

def aka():
    txt.say('''Akash , He is a student of Science and studying in class 11-A    and he is a father of pappu''')
    txt.runAndWait()
def abhi():
    txt1.say('''Abhijeet ohh fuck he is motherfucking asshole and he is also PUBG addict    asshole noob player his Ex girlfirend is Nikita ,and she is also a fucking asshole''')
    txt1.runAndWait()
def oli():
    oliv.say('''Oliver is also known as Mia Khalifa because he looks like mia khalifa    He don't abuse anyone because he is asshole guy LOL''')
    oliv.runAndWait()
def paua():
    pappu.say('''Pappu is Paua seller he like to drink desi alchohol after drinking desi alchohol     he lay down in nala and he love it ''')
    pappu.runAndWait()
def el():
    txt2.say("You Entered Wrong Name ! Brother Try Again ")
    txt2.runAndWait()

n = input("Enter your name : ")
if n == "Akash":
    aka()
elif n == "Abhijeet":
    abhi()
elif n== "Oliver":
    oli()
elif n== "Pawan" :
    paua()
else:
    el()


#3:- Source-Code :


import pyttsx3
akash = pyttsx3.init()
abhijit = pyttsx3.init()
error = pyttsx3.init()
oliv = pyttsx3.init()
pappu = pyttsx3.init()

def aka():
    akash.setProperty('rate',145)
    akash.setProperty('volume',1)
    akash.say('''Akash , He is a student of Science and studying in class 11-A
    and he is a father of pappu''')
    akash.runAndWait()
def abhi():
    abhijit.setProperty('rate',145)
    abhijit.setProperty('volume',1)
    abhijit.say('''Abhijeet ohh fuck he is motherfucking asshole and he is also PUBG addict
    asshole noob player his Ex girlfirend is Nikita ,and she is also a fucking asshole''')
    abhijit.runAndWait()
def oli():
    oliv.setProperty('rate',145)
    oliv.setProperty('volume',1)
    oliv.say('''Oliver is also known as Mia Khalifa because he looks like mia khalifa
    He don't abuse anyone because he is asshole guy !, Hahahahahahahahah''')
    oliv.runAndWait()
def paua():
    pappu.setProperty('rate',145)
    pappu.setProperty('volume',1)
    pappu.say('''Pappu is Paua seller he like to drink desi alchohol after drinking desi alchohol
    he lay down in nala and he love it !, pappu is also a PAAUUAA addict guy ''')
    pappu.runAndWait()
def el():
    error.setProperty('volume',1)
    error.say("You Entered Wrong Name ! Brother Try Again ")
    error.runAndWait()

while 1:
    n = input("Enter your name : ")
    if n == "Akash" and  "akash":
        aka()
    elif n == "Abhijeet" and "abhijeet":
        abhi()
    elif n== "Oliver" and "oliver":
        oli()
    elif n== "Pawan" and "pawan" :
        paua()
    else:
        el()








: )

 : )
Text to Speech | Akash | Abhi | Oli | Paua Text to Speech | Akash | Abhi | Oli | Paua Reviewed by Coding Guy on November 07, 2019 Rating: 5

No comments:

Powered by Blogger.