0% found this document useful (0 votes)
26 views4 pages

Source Code PDF

Uploaded by

selvibabu2701
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

Source Code PDF

Uploaded by

selvibabu2701
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

import tkinter as tk

from deep_translator import GoogleTranslator


import tkinter as tk
import pyttsx3
import speech_recognition as sr
#text to voice space
newVoiceRate = 100
engine = [Link]('sapi5')
voices = [Link]('voices')
[Link]('rate', newVoiceRate)
[Link]('voice', voices[0].id)
frame=''
rexur=''
def exe4():
[Link]()
def texttov():
global ent,lable
if lable:
[Link]()
v=[Link]()
word=[Link]()
[Link](v)
[Link]()

def tex0t():
global frame, homebut, ent
[Link]()
frame = [Link](tab)
[Link]()
lbl = [Link](frame, text='text to speech')
[Link]()
ent = [Link](frame)
[Link]()
texb = [Link](frame, text='####GO####', command=texttov)
[Link]()
homebut = [Link](frame, padx=20, pady=20, command=home,
text='go home')
[Link](x=780, y=680)
[Link]()

#transulating space

lable=''
def tana(tar='ta'):
global ent,lable
if lable:
[Link]()
v=[Link]()
text = [Link]()
r = ''
translator = GoogleTranslator(source='auto', target=tar)
for i in text:
o = [Link](i)
r=r+''+o

lable=[Link](frame,text=r)
[Link]()
def transul():
global frame,homebut,ent
[Link]()
frame=[Link](tab)
[Link](x=0, y=0)
[Link]()
lbl=[Link](frame,text='TRANSULATOR')
[Link]()
ent=[Link](frame )
[Link]()
tranbu=[Link](frame,text='####GO####',command=tana)
[Link]()
homebut = [Link](frame, padx=20, pady=20, command=home,
text='go home')
[Link](x=780, y=680)
[Link]()
#voice to text
def voitotex():
global rexur
# Initialize the recognizer
'''r = [Link]()
# Use the default microphone as the audio source
with [Link]() as source:
# Adjust for ambient noise (optional)
r.adjust_for_ambient_noise(source, duration=0.5)
try:
while True:
# Listen for audio input
audio_data = [Link](source)

# Recognize (convert from speech to text)


rexur = r.recognize_google(audio_data)
return
except [Link]:

print("Sorry, I couldn't understand what you said.")


except [Link] as e:
print(f"Error connecting to Google Speech Recognition service:
{e}")'''
rexur='a computer project'
def vtot():
global frame, homebut, ent
[Link]()
frame = [Link](tab)
[Link](x=0, y=0)
[Link]()
lbl = [Link](frame, text='VOICE TO TEXT')
[Link]()

vt = [Link](frame, text='####GO####', command=voitotex)


[Link]()

lbl2=[Link](frame,text=rexur)
[Link]()
homebut = [Link](frame, padx=20, pady=20, command=home,
text='go home')
[Link](x=780, y=680)
[Link]()
#home page
def home():
global frame,tab
if lable:
[Link]()
[Link]()
frame=[Link](tab)
[Link](x=0,y=0)
[Link]()
tran=[Link](frame,command=transul,text='transulate')
[Link]()
txtto=[Link](frame ,command=tex0t,text='TEXT TO VOICE')
[Link]()
vot=[Link](frame ,command=vtot,text='VOICE TO TEXT')
[Link]()
tab=[Link]()
[Link]('DIGITAL NOTE')
bg =
[Link](file=r"C:\Users\kalai\OneDrive\Pictures\abc\WhatsApp
Image 2024-07-16 at 05.19.09_1950bb6a.png")
icon=[Link](file=r"C:\Users\kalai\OneDrive\Desktop\[Link]")
[Link](False,icon)
bgl = [Link](tab, text='py', image=bg)
[Link]()
[Link](x=0, y=0)
frame=[Link](tab)
[Link](x=0, y=0)
[Link]()
home()
exb=[Link](tab,text='EXIT',command=exe4)
[Link]()
[Link]()

You might also like