You are on page 1of 20

MAHALASHMI

VIDHYA MANDHIR
COMPUTER SCIENCE PROJECT
On
Python Translator
Academic Session 2022-23

SUBMITTED BY: SUBMITTEDTO:


NIVEDH MANOJ MRS.RAMYA
N.KEERTHIVASAN
ACKNOWLEDGEMENT

I wish to express my deep sense of gratitude and debtedness to our

learned teacher Ms.RAMYA for her valuable help, advice and

guidance in the preparation of this Practical File. I am also greatly

indebted to our principal Ms. Beulah Prema Darling.A and school

authorities for providing me with the facilities and requisite

laboratory conditions for making this practical file. I also extend my

thanks to several teachers, my classmates and friends who helped

me to complete this project successfully.


CERTIFICATE

This is to certify that Keethivasan.N student of Class XII, Mahalashmi

Vidhya Mandhir has completed the PROJECT during the academic year

2022-23 towards partial fulfillment of credit for the Computer Science

practical evaluation of

CBSE SSCE-2023 and submitted satisfactory report, as compiled in the

following under my supervision.

Internal Examiner External Examiner

Date: School Seal Principal


TABLE OF CONENTS
S.No Particulars Page no Signature

1 Abstract 5

2 Introduction 6

3 Translator 8
application

4 Hardware 11
requirements

5 Modules 12

6 Flow diagram 13

7 Advantages 14

8 Disadvantages 15

9 Source Code 16

10 Output 19

11 Conclusion 20

12 Reference 21
ABSTRACT

PYTHON TRANSLATOR's goal is to develop a set of tools

for translating texts between multiple languages in real time with high

quality. Languages are separate modules in the tool and can be varied;

covering a majority of the EU's 107 official languages will be built. As

its main technique, PYTHON TRANSLATOR uses domainspecific

semantic grammars and ontology-based interlinguas. These

components are implemented in GF (Grammatical Framework), which

is a grammar formalism where multiple languages are related by a

common abstract syntax. GF has been applied in several small-

tomedium size domains, typically targeting up to ten languages but

MOLTO will scale this up in terms of productivity and applicability.


Introduction

Before arriving at speech and writing, the first men developed

communication by signs, sounds and mimics. This development took

place in different places, in different times, between more or less

distant groups. This favored the birth of language families (languages

with the same roots) which are divided into about thirteen main

groups:

1. Niger–Congo (1,542 languages) (21.7%)


2. Austronesian (1,257 languages) (17.7%)
3. Trans–New Guinea (482 languages) (6.8%)
4. Sino-Tibetan (455 languages) (6.4%)
5. Indo-European (448 languages) (6.3%)
6. Australian [dubious] (381 languages) (5.4%)
7. Afro-Asiatic (377 languages) (5.3%)
8. Nilo-Saharan [dubious] (206 languages) (2.9%)
9. Oto-Manguean (178 languages)(2.5%)

When people started to move around, they realized that they could not
always communicate with others as they wished. So the need for
interpreters arose, and with the advent of writing the need for translators.
There are many ways to translate from one language to another. The easiest
way seems to be to translate one word for another and see what happens.
Unfortunately, it’s not as simple as that. Who hasn’t tried to translate a text
using an automatic translator on the Internet? Those who have, can confirm
that the result is not always understandable. No matter how well
programmed a machine is, it will never be able to convey the facets and
emotions of a text written by a person. The human factor is missing, hence
the need for a translator. Languages are of strategic importance to people
and the planet and play a vital role in development. They are a guarantee of
cultural diversity and intercultural dialogue, (2) and a means of achieving
quality education for all, strengthening cooperation, building inclusive
knowledge societies, preserving cultural heritage and mobilizing political
will to apply the benefits of science and technology for sustainable
development.
Translator Application

1.Technical translation
If businesses want to access the global audience, they must
translate all their technical documents into the languages of their
target areas. This is when the technical translation services are
required. Technical translation involves translating documents
produced by technical writers, or any other content related to
scientific and technological subjects. To avoid any errors,
companies must take the help of professional translators who have
the required expertise and knowledge of different technical terms,
both in the source and target languages. In doing so, this reduces
any misunderstanding with respect to the documents and the
subsequent effects associated with them.
2.Language translation in healthcare

If you’re in the healthcare industry, the need for language translation is


even higher because of the involvement of human beings. Any minor error
can be a threat to their lives. Therefore, hiring a professional and
experienced translator is exceptionally crucial for effective communication
between the doctor, nurses, and patients.Translation experts should be
medical and science graduates. Moreover, they should be well-versed with
medical concepts and terminologies. The most vital medical documents that
need translation include discharge instructions, complaint forms, intake
forms that have clinical consequences, and informed consent documents.
3. Language translation in healthcare

In the travel and tourism sector, language translation is required


for a variety of things. For example, the translation of travel
documents, brochures, and terms and conditions documents is
crucial for interacting with people of different regions. Hence, if
the companies want to attract and retain tourists, it is essential to
hire a translator who is fluent in both the original and the target
language. If done right, translation can prove to be a vital factor in
the growth of international tourism and the economy on the whole.
While dealing with global clients and other staff members, you
have no time for language barriers to get in the way. Sure, Google
Translator can be useful to some extent, but it is often misleading.
Therefore, choosing a professional translator for your business can
help break down such barriers and ensure that your message is
communicable to a worldwide audience.
Hardware and Software Requirements

 OPERATING SYSTEM -WINDOWS 7 AND ABOVE

 PROCESSOR-Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz

 MOTHERBOARD-lenovo mahobay

 RAM-8GB ddr3

 Hard disk SATA 40 GB OR ABOVE

 VIII. MONITOR 14.1 or 15 -17 inch

 IX. Key board and mouse

 Windows OS

 Python IDLE

 Microphone and Speakers


Modules

 Pyaudio

 Googletrans

 Speech recognition

 gtts
Flow Diagram
Advantages

 It can translate without internet.


 It provides speech to speech translation.
 It works based on only 4 basic modules.
 It displays the output faster than other translator which requires
internet.
 It helps to break language barrier and makes it easy for the users to
communicate.
 It is very simple to initiate the translation process.
 The source code for this Python Translator is not very complicated.
 It has speech to speech translation so that visually impaired users can
also get to access.
Disadvantages

 It has recognition problems.


 The microphone should be connected properly in order to function
without any error.
 Without the input device(microphone)the python translator won’t
run.
Source code

import speech_recognition spr

import googletrans import

from gtts import gTTS

import os

recog1 = spr.Recognizer()

mc = spr.Microphone()

with mc as source:

print("Speak 'hello' to initiate the Translation !")

print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

recog1.adjust_for_ambient_noise(source, duration=0.2)

audio = recog1.listen(source)

MyText = recog1.recognize_google(audio)

MyText = MyText.lower()

if 'hello' in MyText:
translator = Translator()

from_lang = 'en'

to_lang = 'hi'

with mc as source:

print("Speak a stentence...")

recog1.adjust_for_ambient_noise(source, duration=0.2)

audio = recog1.listen(source)

get_sentence = recog1.recognize_google(audio)

try:

print("Phase to be Translated :"+ get_sentence) text_to_translate = translator .

translate(get_sentence,src= from_lang,dest= to_lang)

text = text_to_translate.text

speak = gTTS(text=text, lang=to_lang, slow= False)

speak.save("captured_voice.mp3")
os.system("start captured_voice.mp3")

except spr.UnknownValueError:

print("Unable to Understand the Input")

except spr.RequestError as e:

print("Unable to provide Required Output".format(e))


OUTPUT
Conclusion

This has been a very interesting project and as you can see there is more
opportunities for further research to be established. If we are to provide a
reason for the differences for a translator performance, it could come down
to the user base rating system found in google translator. In conclusion this
program is created to make people more knowledgeable, reduce
miscommunication among people all around the world, connects people
and for more specicfically this program was created to connect visually
impaired people with normal people.
Reference
 With the help of my csc teacher.
 Preethi Arora(Class12th)
 https://www.geeksforgeeks.org/language-translator- using-google-apiin-
python/
 Youtube.com

You might also like