Uploaded by DARSHAN RAJ A S

FINAL (7)

advertisement
DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION
ENGINEERING
Minor Project Report
18EI64
“SPEECH TO BRAILLE CONVERTER FOR THE VISUALLY
IMPAIRED”
Under the guidance of
Dr. Kendaganna Swamy S
Assistant Professor
Department of EIE, RVCE
Submitted by,
P Sujith
1RV18EI038
Rohith Vivek Kamath
1RV18EI046
S Kandha Kumaran
1RV18EI048
Vaibhav B. A
1RV18EI060
2020-2021
(EVEN SEMESTER)
DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION
ENGINEERING
CERTIFICATE
Certified that the project work titled “SPEECH TO BRAILLE CONVERTER FOR THE VISUALLY
IMPAIRED” carried out by P Sujith (1RV18EI038), Rohith Vivek Kamath (1RV18EI046), S Kandha
Kumaran (1RV18EI048) and Vaibhav B. A (1RV18EI060) who are bonafide students, submitted in partial
fulfillment for the award of 6th semester Bachelor of Engineering in Electronics and Instrumentation of RV
College of Engineering®, Bengaluru, affiliated to Visvesvaraya Technological University, Belagavi, during
the year 2020-21. It is certified that all corrections/suggestions indicated for internal assessment have been
incorporated in the report deposited in the departmental library. The project report has been approved as it satisfies
the academic requirement in respect of project work prescribed for the said degree.
Internal Guide
Head of Department
Dr. Kendaganna Swamy S
Dr. C.H.Renumadhavi
Assistant Professor
Department of EIE, RVCE
Name of the Examiners
1.
2.
Associate Professor and HoD
Department of EIE, RVCE
Signature with Date
DECLARATION
We, P Sujith (1RV18EI038), Rohith Vivek Kamath (1RV18EI046), S Kandha Kumaran
(1RV18EI048) and Vaibhav B.A. (1RV18EI060) the students of 6th semester BE in
Electronics and Instrumentation, RV College of Engineering®, Bengaluru, declare that the
Minor Project with title “SPEECH TO BRAILLE CONVERTER FOR THE VISUALLY
IMPAIRED”, has been carried out by us. It has been submitted in partial fulfillment of the 6th
Semester Bachelor of Engineering program in Electronics and Instrumentation Engineering of
RV College of Engineering®, Bengaluru, affiliated to VisvesvarayaTechnological University,
Belagavi, during the academic year 2020-2021. The matter embodied in this report has not
been submitted to any other university or institution for the award of any other degree or
diploma.
Date of submission:
Sl. No.
Student Name
1.
P Sujith
2.
Rohith Vivek Kamath
3.
S Kandha Kumaran
4.
Vaibhav B.A.
Signature
TABLE OF CONTENTS
ABSTRACT
i
LIST OF FIGURES
ii
LIST OF ABBREVIATIONS
iv
1. INTRODUCTION
1
1.1 Introduction
2
1.2 Literature survey
3
1.3 Research gap
7
1.4 Motivation
7
1.5 Aim
7
1.6 Objectives
7
2. METHODOLOGY
8
2.1 Speech to braille
10
2.2 Image to braille
11
2.3 Hardware module
12
2.4 Block diagram
13
3. COMPONENTS USED
14
3.1 Camera module
15
3.2 LCD Display
16
3.3 Microphone module
16
3.4 Push-pull solenoid
17
3.5 Raspberry Pi
17
3.6 Speaker
18
3.7 Stepper motor
19
3.8 Two-axis module design
19
4. IMPLEMENTATION
21
4.1 Platform
22
4.2 Algorithm to convert speech to text
22
4.2.1 Algorithm to convert speech from audio file to text
22
4.2.2 Algorithm to convert speech from microphone to text
23
4.3 Algorithm to convert image to text
24
4.4 Algorithm to convert text to braille
25
4.5 Algorithm to convert text to speech
26
5. RESULTS
28
5.1 Speech to text
29
5.2 Image to Text and Braille
30
5.3 Text to Speech
30
6. CONCLUSION AND FUTURE SCOPE
32
6.1 Conclusion
33
6.2 Future scope
33
7. REFERENCES
34
8. APPENDIX
37
ACKNOWLEDGEMENT
We would like to thank everyone who made it possible and whose support, encouragement and
guidance have been a continuous source of inspiration through the course of this project.
We thank our internal guide Dr. Kendaganna Swamy S, Assistant Professor, Department
of Electronics and Instrumentation Engineering, R V College of Engineering for the
constant support, encouragement and guidance.
We thank the minor project coordinator, Dr. Rachana S Akki, Assistant Professor,
Department of Electronics and Instrumentation Engineering, R V College of Engineering
for the constant support, encouragement and guidance.
We thank Dr. Sandesh R S, Assistant Professor, Department of Electronics and
Instrumentation Engineering, R V College of Engineering for the constant feedback and
support.
We thank Dr. C. H. Renumadhavi, Associate Professor and Head of Department,
Department of Electronics and Instrumentation Engineering, R V College of Engineering
for the constant support and encouragement.
We thank Dr. K. N. Subramanya, Principal, R V College of Engineering for the constant
support.
We would also like to thank all teaching staff and non-teaching staff who have responded to
all our requests and without whom this project would not have been possible to complete.
Finally, we would like to thank one and all involved directly and indirectly in this project.
ABSTRACT
As per the World Health Organization (WHO), there are an estimated 1.4 million visually
impaired children in the world out of which at least 2,00,000 children are from India. Out of
these 2,00,000 children in India, only a mere 15,000 children have been enrolled in schools for
the blind throughout the country. At a time when the government is focusing its efforts on
providing quality education for the children of the country, a lot of visually impaired students
are being deprived of education due to various constraints. This places them at a disadvantage
with respect to the possible future job prospects.
One of the main constraints that the visually impaired children have to face is the lack of access
to educational resources. The medium of education for the visually impaired childrenis either
through audio or braille script. Currently, the visually impaired children have tomake do
with a very limited amount of braille textbooks. Even when requests are placed for braille
textbooks, it takes a lot of time for the textbook to be prepared as many of the textbooks are
made by making use of typewriters that punch the braille alphabets onto the braille paper. This
method is also prone to many mistakes as this is a manual task.
In order to overcome the current shortcomings of the educational system for the visually
impaired a robust solution must be devised that could help the students in a much faster and
efficient way. This project looks to bridge this gap between the visually impaired students and
educational braille resources. The proposed device aims to help the students by providingaccess
to both audio and braille capabilities on the same device. This project makes use of a
microphone module which is used to obtain the speech input that is to be converted into braille
script. The speech input is stored as a wav file. A camera module also allows imagesto be
captured, specifically, the images of the text that is to be converted into braille script asa jpeg
file. The audio files and images thus obtained are then converted into text files containing the
text to be converted. This is accomplished by making use of the speech recognition package
and the pytesseract package for the audio to text and image to text conversion respectively. The
text file is then converted to a braille script by making use of algorithms that are implemented
by using Python programming and Raspberry Pi. The brailleoutput is then sent to the hardware
module which embosses the alphabets onto the braille paper. The audio files, images and text
files can be saved in the cloud for future reference.
i
LIST OF FIGURES
Figure 1.1: Standard braille cell
3
Figure 2: Overall design methodology
9
Figure 2.1: Speech to braille methodology
10
Figure 2.2: Image to braille methodology
11
Figure 2.4: Block diagram of the proposed system
13
Figure 3.1: Camera module
15
Figure 3.2: LCD Display
16
Figure 3.3: Microphone module
16
Figure 3.4: Push pull solenoid
17
Figure 3.5: Raspberry Pi
18
Figure 3.6: Speaker
18
Figure 3.7: Stepper motor
19
Figure 3.8: Front view of hardware module
20
Figure 3.9: Rear view of hardware module
20
Figure 4.2.1: Flowchart to convert speech from audio file to text
23
Figure 4.2.2: Flowchart to convert speech from microphone to text
24
Figure 4.3: Flowchart to convert image to text
25
Figure 4.4: Flowchart to convert text to braille
26
Figure 4.5: Flowchart to convert text to speech
27
Figure 5.1: Speech to text
29
Figure 5.2: Image to text and braille
30
Figure 5.3: Text to speech
31
ii
Figure A.1: Hardware module structure
44
Figure A.2: Solenoid holder
44
Figure A.3: Y-axis holder (support for shaft)
45
Figure A.4: Stepper motor holder
45
iii
LIST OF ABBREVIATIONS
wav- Waveform Audio File Format
jpeg- Joint Photographic Experts Group
MATLAB- MATrix LABoratory
LCD- Liquid Crystal Display
DSP- Digital Signal Processing
ASCII- American Standard Code for Information Exchange
PIC- Peripheral Interface Controller
FPGA- Field Programmable Gate Array
HMM- Hidden Markov Model
GSM- Global System for Mobile communications
RS232- Recommended Standard 232
HDL- Hardware Description Language
API- Application Programming Interface
CSI- Camera Serial Interface
HAT- Hardware Attached on Top.
Hi-Fi- High Fidelity
GPIO- General Purpose Input/Output
CODEC- Coder-Decoder
I2S- Integrated Inter-IC Sound Bus
MEMS- Micro-Electromechanical Systems
CNC- Computer Numerical Control
CATIA- Computer Aided Three-dimensional Interactive Application
gTTS- Google Text-to-Speech
iv
RV College of Engineering®, Bengaluru-560059
CHAPTER 1
INTRODUCTION
Department of Electronics and Instrumentation Engineering, 2021
Page 1
RV College of Engineering®, Bengaluru-560059
CHAPTER 1
INTRODUCTION
1.1
Introduction
An individual is said to be visually impaired when the person loses the function of vision, which
could either be in the eyes or some part of the brain which is responsible for vision. The World
Health Organization (WHO) defines blindness “as a corrected visual acuity in the better eye of
less than 3/60, and severe visual impairment as a corrected acuity in the better eye of less than
6/60”. It is a situation wherein the visual problems cannot be rectified even after making use of
spectacles or contact lenses. It has also been observed that in some low-income countries with high
under-5 year mortality rates, the prevalence of visual impairment may be as high as 1.5 per 1000
children. It is also approximated that around three quarters of the visually impaired childrenlive in
the poorest regions of Africa and Asia. Therefore, education is more often than not, their only way
out to escape the harsh conditions for these children.
Traditionally, visually impaired children have largely been far away from the educational
ecosystem. Socio-economic conditions have played a very important role in the lack of education
among the visually impaired. Though in recent years, large strides have been taken to educate the
visually impaired students. One of the most important contributions to the education of visually
impaired students was the development of the Braille alphabet by Louis Braille. The Braille
alphabets were designed by Louis Braille at the age of fifteen in the year 1824. This set of alphabets
have largely remained unchanged and are still being used today.
The basic braille alphabet, braille numbers, braille punctuation, special symbols, and characters
are constructed from six dots. These braille dots are positioned like the figure six on a die, in a grid
of two parallel vertical lines of three dots each as shown in Figure 1.1. From the six dots thatmake
up the basic grid, 64 different configurations can be created. Most of the languages that exist today
use less than 64 alphabets because of which braille script can be used for encoding them.
Department of Electronics and Instrumentation Engineering, 2021
Page 2
RV College of Engineering®, Bengaluru-560059
Figure 1.1: Standard braille cell
The present educational system makes use of braille textbooks that help the students to study by
feeling the braille alphabets. The drawback of this system is that the textbooks cannot be used
repeatedly as the alphabets are embossed. Repeated use flattens out the alphabets which then
become unrecognizable. Currently, there are not many well-known and widespread publishers of
braille textbooks due to which, textbooks almost have to be made on a need-basis depending upon
the number of students. Due to this, many of the current braille textbooks are created by making
use of typewriters.
This leaves the door open to errors as it involves manual labour and at the same time, only a limited
amount of books can be made in a given amount of time depending on the speed of the person that
is typing the braille alphabets. In order to ensure better access to braille textbooks for the visually
impaired students, a robust device that can convert speech and text to braille can go a long way.
The project proposes an automated device that is capable of storing vast amounts of speech and
text data and converting the same into braille script at any given time of the day. Additionally,
audio output through the speakers aids the visually impaired students as and when required.
1.2
Literature survey
An extensive research was conducted to identify the currently used technologies in order to
develop an automated device having the previously mentioned features.
Hima Pradeep V et al. [1] used a camera to capture the text image, enhance and filter the text
using MATLAB. Further processing is done to convert the text to sound form using a speaker.
Also, the individual letters are sent to a microcontroller which is connected to six solenoids that
are used as pins to imprint the letters. A Text-To-Speech (TTS) synthesizer is used to convert the
text to speech one word at a time and the result of each conversion is concatenated together. The
Windows Speech Application Program Interface has been used.
Department of Electronics and Instrumentation Engineering, 2021
Page 3
RV College of Engineering®, Bengaluru-560059
Swathi Subhash et al. [2] used Python to convert speech into text form and in turn code individual
letters to braille script and also display it on an LCD. Speech input is given through a microphone.
The recorded speech is converted to text using speech recognition. Each text is identified and
compared with the braille database as given below. The braille script can be saved for the purpose
of printing in future. They have made use of a braille database through which the text to braille
alphabet conversion takes place.
Dr V. Ajantha Devi [3] used a braille display instead of a physical paper for the implementation
of braille for Tamil language. The HM2007IC was used as the interaction device. The input isthe
speech signal which is picked up by the DSP processor which sends the corresponding ASCIIcode
to the PIC controller. Signal processing is done on the speech signal and then feature extraction is
performed. Based on the above-mentioned steps, phonetic classification and dynamic decoding
steps are performed on the data in order to obtain the text from speech. The Tamil braille alphabets
are stored in the memory from where the mapping of each letter from the text is done.
Bijet Maynoher Samal et al. [4] developed a bidirectional text transcription of braille for Odia,
Hindi, Telugu and English by making use of Image Processing on FPGA. Image segmentation
technique is used as the base criteria and the processing is done using MATLAB software. The
algorithm utilizes several techniques such as segmentation, histogram analysis, pattern
recognition, letter arrays and database generation. All these operations are performed using the
Spartan 3e FPGA kit. The database used for the conversion is stored in terms of arrays, each of
size six, corresponding to the six possible dots of the braille cell. The letters are then mapped from
the database table.
Jie Li et al. [5] uses Haar feature extraction and provides it to a Support Vector Machine (SVM)
which is a machine algorithm that is used for braille character recognition. The braille documents
are scanned as colour images which are then converted into corresponding grayscale images. Haar
feature vector is calculated for each of the sub-images and then sent to the Support Vector Machine
(SVM) in order to decide whether a dot is present or not. The resulting image is a
Department of Electronics and Instrumentation Engineering, 2021
Page 4
RV College of Engineering®, Bengaluru-560059
binary image on which a simple searching algorithm is applied in order to convert the braille
alphabets into English alphabets.
P. Blenkhorn et al. [6] described a novel method for automatically generating braille documents
from word-processed (Microsoft Word) documents. In particular it details how, by using the Word
Object Model, the translation system can map the layout information (format) in the print
document into an appropriate braille equivalent alphabet.
Padmavathi. S. et al. [7] developed a technique based on image enhancement. The input image
is passed through a filter in order to eliminate the noise that may be present in the image.
Segmentation technique is then used to obtain binary dot patterns of each of the scanned cells.
Horizontal and vertical profiling is done to identify the positions where the dots are present in the
image. The binary array is generated based on the outputs of the profiling steps. The binary array
is then converted into the corresponding braille alphabets by making use of a database.
Kaustubh Bawdekar et al. [8] proposed a device that converts images into braille script by
applying image processing techniques such as filtering, edge detection and charactersegmentation.
The images were acquired by using Mag-Pi which was directly interfaced with theRaspberry Pi
microcontroller. They have made use of optical character recognition based on adaptive
thresholding. The grayscale image that is captured is converted into a binary image. Component
analysis is done on the binary image from which the text lines are organized into words.
Foysal Ahmed et al. [9] proposed a hardware and software system to help the visually impaired
people to write braille letters using the imprinted braille paper as their medium of
communication. This device trains with voice data from the human and transforms the voice data
into text form using HMM. The result showed that 97.6% of words are imprinted correctly after
one iteration of training.
Department of Electronics and Instrumentation Engineering, 2021
Page 5
RV College of Engineering®, Bengaluru-560059
Tirthankar Dasgupta et al. [10] presented a transliteration system from Indian language’s text to
braille format. In a vision of removing the gap between a sighted and visually impaired personthey
took the step to make such a device. It needs a braille keyboard and other devices like that which
is very hard for the visually impaired person to perform.
Melissa Ramírez et al. [11] made an automated speech recognition system which helped the
visually impaired children to learn braille. Their paper introduced a new training algorithm for the
device and tested the device which positively resulted in approximately 89%. The device receives
command through a mic and provides the command as text format.
P. H. Zope et al. [12] worked on using the GSM module where it will transmit the character using
AT command. It converts English to braille by storing characters in the database and
microcontrollers take inputs as an English code. After getting a verified message it is displayed on
the LCD. Lastly, it converts it into braille corresponding solenoid cell dots that get uplifted at the
top.
A. Mathivani et al. [13] worked on using RS232 which is used to send data in serial format.
RS232 performs in between the Personal Computer (PC) with MATLAB software and
microcontroller. Microcontrollers act as an input, it is fed to the driver circuit and is used to control
another circuit such as high power components. Then this is fed to the relay which acts like a
switch on and off to reduce the current that flows through the primary control switch. Further,
solenoid coils are used for raising the braille code .It will be raised according to the buttons by
using electromagnetic effects.
S. R. Rupanagudi et al. [14] developed a transcription for Kannada braille for converting text
into speech using Spartan 3e series FPGA. Initially, the braille character is captured by making
use of a camera. Then the braille character is extracted by making use of an auto thresholding
technique based on histogram. The background noise is then filtered and the braille alphabet is
Department of Electronics and Instrumentation Engineering, 2021
Page 6
RV College of Engineering®, Bengaluru-560059
identified by using a unique grouping mechanism. It makes use of letter pattern recognition and
uses a modified database for different languages such as Odia, English, Telugu and Hindi.
1.3
Research gap
By referring to different research papers, it was found that:
● There is a lack of fully automated devices which convert speech into braille script.
● There is a lack of fully automated devices which convert text into braille script.
● There is also a lack of large storage capabilities for storing the speech and text documents
for future use.
1.4
Motivation
Sharing and consuming information has become an important part of our day-to-day lives. Forthe
visually impaired, not having access to appropriate resources can be detrimental to their learning
process. In the current scenario, it is difficult for the students to obtain braille textbooks and it is
also a time-consuming process as it is manual. Having an automated device that can convert speech
and images into braille script within a few minutes can go a long way in helping the visually
impaired in keeping up with the rest of the world.
1.5
Aim
Design and Development of Speech to Braille Converter for the Visually Impaired using python,
pytesseract package, speech recognition package and cloud-based services.
1.6
Objectives
●
Design an algorithm to convert scanned images to text files.
●
Compose an algorithm to convert audio to text file in real time.
●
Construction of a micro-controller-based mechanical system to convert text files to
braille script.
● Develop a cost effective and storage enhanced automated IoT enabled device.
Department of Electronics and Instrumentation Engineering, 2021
Page 7
RV College of Engineering®, Bengaluru-560059
CHAPTER 2
METHODOLOGY
Department of Electronics and Instrumentation Engineering, 2021
Page 8
RV College of Engineering®, Bengaluru-560059
CHAPTER 2
METHODOLOGY
2. Methodology
Figure 2: Overall design methodology
By looking into the research gap, the following methods are proposed in order to design and
develop a speech to braille converter. Audio is first acquired by using a microphone that is
interfaced with the Raspberry Pi microcontroller. This audio file is converted into a text file by
using the speech recognition package available for the Python programming language. One
package that stands out in-terms of ease of use is the speech recognition package. The speech
recognition library acts as a wrapper for several popular speech APIs and is thus extremely flexible.
One of these—the Google Web Speech API—supports a default API key that is hard- coded into
the speech recognition library. This package converts the audio file into a text file.The text file
that is generated is then converted into a braille script by the Raspberry Pi microcontroller. A push
pull solenoid is used along with a two axis printer that embosses the braille paper with the
corresponding braille characters generated by the microcontroller.
Additionally, scanned documents are converted into text files by using the pytesseract library
which generates a text file and the text file is then converted into a braille script using the same
setup. The speaker helps to aid the student by providing an audio output corresponding to the text
file. An LCD display also prints the corresponding text file, which can also be used as a means for
verifying the converted text file. Cloud storage provides flexibility by storing audio, image
Department of Electronics and Instrumentation Engineering, 2021
Page 9
RV College of Engineering®, Bengaluru-560059
and text files which can later be converted into braille script whenever required. Figure 2 shows
the overall design methodology.
2.1 Speech to braille
Figure 2.1: Speech to braille methodology
Figure 2.1 depicts the speech to braille methodology where a microphone module is used to accept
the speech input that is to be converted into braille script. The USB Microphone offers
compatibility with any plug-and-play enabled Raspberry Pi Model B+, 2 model B and Raspberry
Pi 3 is being used here. The microphone module is connected to the Raspberry Pi microcontroller
Raspberry pi 3b+ is used because 3b+ supports 2.4GHz and 5GHz and is capable of 300Mbps
ethernet speed hence faster data transfer. The given input audio file is in .wav format which is
then processed by using the speech recognition package available for Python programming. It also
offers support for several engines and APIs both online as well as offline.
In order to convert the speech into text, firstly, the speech signal must be converted into an
electrical signal by using a microphone. The electrical analog signals are then converted into digital
signals by making use of analog-to-digital converters. Once the speech is available in digital form,
various models can be used to convert it into text. One of the most common techniques used for
this process is the Hidden Markov Model (HMM). Once this is done, the text
Department of Electronics and Instrumentation Engineering, 2021
Page 10
RV College of Engineering®, Bengaluru-560059
file can be sent to the hardware module for immediate conversion to braille output, the speaker
module so that there is an audio output WM8960 Audio Decoder Board Stereo Expansion w/
Speakers are used for Raspberry Pi 3B+, the 16x2 LCD display is used so that the text can be
displayed and can also be uploaded into the cloud for future usage.
2.2 Image to braille
Figure 2.2: Image to braille methodology
A camera module is used to obtain the images of the text. The source of the image can be any piece
of paper, textbook or notebook. The camera module captures the image of the text as a jpeg file.
The file is then processed using the pytesseract package. The pytesseract package converts the jpeg
image file into text in the form of strings. The output text can be saved as a text file on which
various further operations can be performed. The text file can then be converted into the
corresponding braille alphabets by calling appropriate functions for the operations that are to be
performed. Signals can then be sent to the hardware module for immediate conversion to braille
output. Signals can also be sent to the speaker module so that there is an audio output The LCD
display can be used to display the text. The overall process flow is shown in Figure 2.2.
Department of Electronics and Instrumentation Engineering, 2021
Page 11
RV College of Engineering®, Bengaluru-560059
2.3 Hardware Module
The hardware module is responsible for the final task of converting the given input into braille
output. The hardware module must be rigid and stable such that there is no considerable damage
to the setup under acceptable mechanical stresses. The hardware module is similar to a two-axis
printer. It has been modelled after a two-axis printer because the movements can take place along
both the x-axis and the y-axis. The specific component that is responsible for embossing the braille
alphabets onto the braille paper is the push-pull solenoid. The push-pull solenoid is controlled by
the Raspberry Pi microcontroller depending upon the braille alphabet that is to be embossed. The
push-pull solenoid has only two possible states analogous to a switch, either ON or OFF. If the
push-pull solenoid is ON, it means that the particular dot must be embossed at the particular
position whereas if it is OFF, it means that no dot must be embossed at the particular position. The
push-pull solenoid is controlled and made to be present at the appropriate position by making use
of the stepper motors. The push pull solenoid is one of the crucial components of the system
because in order to ensure correct conversion of the text into braille, the push pull solenoid must
be able punch at the right positions. The push pull solenoids are easily available and therefore are
widely used in various embedded system applications.
A stepper motor is a type of DC motor that works in discrete steps and used everywhere from a
surveillance camera to sophisticated robots and machines. Stepper motors provide accurate
controlling, and can be differentiated on the basis of torque, steps per revolution, and input voltage.
The stepper motor is a 4-wire bipolar stepper that has 1.8° per step for smooth motion and sufficient
amount of holding torque. It is a four phase, unipolar, permanent magnet stepper motor. It is a
standard size and has 200-steps-per-revolution. The NEMA 17 (1.7 in. square footprint, 5 mm
shaft diameter) is a 12 V motor. This motor, like most stepper motors, is a permanent magnet
motor. The Mosaic stepper is typical of common high-resolution motors – a full revolution requires
200 steps, while each step turns the shaft only 1.8° for a full step, or 0.9° in half-stepping mode.
This sized motor is commonly used in household appliances, medical equipment, stage lighting
devices, and in various industrial control applications.
Department of Electronics and Instrumentation Engineering, 2021
Page 12
RV College of Engineering®, Bengaluru-560059
2.4 Block Diagram
Figure 2.4: Block diagram of the proposed system
Figure 2.4 is the top level block diagram representation of the proposed automated cloud based
speech to braille converter device. Vocal data and image documents are obtained from the
microphone and camera module respectively which are attached to the Raspberry Pi
microcontroller. The microcontroller converts these inputs into a text file. The text file is then
converted into braille script by the means of a custom two axis printer. The two axis printer uses
a push pull solenoid arrangement in order to emboss the braille characters onto the braille paper.
A speaker is also present that reads aloud this text file. The LCD display can be used to verify
the text file that is generated by the microcontroller
Department of Electronics and Instrumentation Engineering, 2021
Page 13
RV College of Engineering®, Bengaluru-560059
CHAPTER 3
COMPONENTS USED
Department of Electronics and Instrumentation Engineering, 2021
Page 14
RV College of Engineering®, Bengaluru-560059
CHAPTER 3
COMPONENTS USED
3.1 Camera Module
Figure 3.1: Camera module
The Raspberry Pi Camera Module v2 is a high quality 8 megapixel Sony IMX219 image sensor
custom designed add-on board for the Raspberry Pi as shown in Figure 3.1. The camera module is
composed of a fixed focus lens. It is capable of capturing 3280 x 2464 pixel static images, and also
supports 1080 p 30, 720 p 60 and 640 x 480 p 90 video. The focal length of the Raspberry Pi
Camera (the distance from the front of the lens to the closest object which is in focus) is around
50 cm. This value of focal length is sufficient for day-to-day activities. It is connected to the
Raspberry Pi via one of the small sockets on the upper surface of the board and usesthe
dedicated CSI interface designed specifically for interfacing cameras. The camera module is also
rigid and has a high mechanical strength. Therefore the camera modules can be used in various
applications that may be subjected to mechanical vibrations and mechanical stresses.
Department of Electronics and Instrumentation Engineering, 2021
Page 15
RV College of Engineering®, Bengaluru-560059
3.2 LCD Display
Figure 3.2: LCD Display
The term LCD stands for liquid crystal display. It is one kind of electronic display module used
in an extensive range of applications like various circuits and devices like mobile phones,
calculators, computers, TV sets, etc. These displays are mainly preferred for multi-segment lightemitting diodes consisting of seven segments. The main benefits of using this module are that they
are inexpensive; easily programmable and that there are no limitations for displaying custom
characters as well as animations. Figure 3.2 represents the LCD module.
.3.3
Microphone Module
Figure 3.3: Microphone module
The Raspberry Pi USB Plug and Play Desktop Microphone is a USB Microphone that offers
compatibility with any plug-and-play enabled Raspberry Pi Model B+, 2 model B and Raspberry
Pi 3 is shown in Figure 3.3. It is also compatible with PC and Mac. The microphone has advanced
digital USB which provides superior clarity with the simplicity of a single USB plug – and – play
connection. Microphone pivots on the base to hold a preferred position.
Department of Electronics and Instrumentation Engineering, 2021
Page 16
RV College of Engineering®, Bengaluru-560059
3.4 Push Pull Solenoid
Figure 3.4: Push pull solenoid
Figure 3.4 represents a DC 24 V 300mA push pull solenoid electromagnet has the following
specifications- 10mm 6N push pull type, open frame type, linear motion, plunger spring return,
open coil form, DC electromagnet. It is widely used in home appliances, vending machines, game
machines and auto door locks. The pin will be propelled forward when the solenoid is energised
and the pin will retract when the solenoid is not energised. It is a steady and durable stepper motor.
3.5 Raspberry Pi
Figure 3.5 shows a Raspberry Pi which is an open-source development platform that functions
similar to a mini-computer. It is different from other development boards because it functions using
specific operating systems that are custom designed for this purpose. It has several peripherals that
allow the users to interface it with different varieties of components varying from sensors,
actuators, and other input-output components. Raspberry Pi comes with on-board inbuilt
peripherals to connect it with the internet. It is majorly used in the field of automation. Over the
years the company has developed many versions of the board. Each version has the best of the
technology integrated onto the board. The board offers high-end RAM and CPU performance that
makes it versatile as compared to other development boards in the market. It is being extensively
used for automation and artificial intelligence deployment modules because of its high
computational power and low power consumption.
Department of Electronics and Instrumentation Engineering, 2021
Page 17
RV College of Engineering®, Bengaluru-560059
Figure 3.5: Raspberry Pi
3.6 Speaker
Figure 3.6: Speaker
Figure 3.6 is a sound card HAT designed for Raspberry Pi. It is commonly used because of its low
power consumption, support for stereo encoding/decoding and feature for Hi-Fi playing/recording.
It can also directly drive the speakers to play audio files. The standardRaspberry Pi 40-pin GPIO
extension header, supports Raspberry Pi series boards.
It can integrate WM8960 low power stereo CODEC, communicate via I2S interface, integrate dual
high-quality MEMS silicon microphone and support left and right double channel recording. It
can connect to an onboard standard 3.5mm earphone jack and play music via external earphones.
The onboard dual-channel speaker interface directly drives speakers and supports sound effects
such as stereo, 3D surrounding, etc.
Department of Electronics and Instrumentation Engineering, 2021
Page 18
RV College of Engineering®, Bengaluru-560059
3.7 Stepper Motor
Figure 3.7: Stepper motor
The stepper motors move in precisely repeatable steps; hence they are the motors of choice for the
machines requiring precise position control. The Figure 3.7 represents a NEMA17 model of
stepper motor which is 4.2 kg-cm. The stepper motor can provide 4.2 kg-cm of torque at 1.2A
current per phase. The position of the motor can be commanded to move or hold at one position
with the help of stepper motor drivers. The NEMA17 4.2 kg-cm stepper motor provides excellent
response to starting, stopping and reversing pulses from the stepper motor driver. Stepper motors
are used in various applications, especially those which demand low speed with high precision.
Many machines such as 3D printers, CNC router and mills, camera platforms, XYZ plotters etc.
make use of stepper motors. It is a brushless DC motor, so the life of this motor is dependent upon
the life of the bearings. The position control is achieved by a simple open loop control mechanism
that does not require complex electronic control circuitry.
It comes with a detachable 70cm cable which makes wiring and rewiring very fast and easy. The
design of this cable is such that it can be directly mounted on a stepper motor controller. The shaft
of the motor has been machined for good grip with a pulley, drive gear etc., and especially designed
to avoid stall or slip.
3.8 Two-Axis Module Design
The two axis module design has been chosen for the project. The two-axis design offers movement
along both the x-axis and y-axis of the braille paper Figure 3.8 is the front view of thehardware
module. The design of the structure for the two-axis module printer has been done using the
CATIA software. CATIA stands for Computer Aided Three-dimensional Interactive
Department of Electronics and Instrumentation Engineering, 2021
Page 19
RV College of Engineering®, Bengaluru-560059
Application. It is a computer aided manufacturing tool that helps in designing three dimensional
models. It also provides an option to create files that can generate 3D printable models. The design
consists mainly of two stepper motors that help to move the push pull solenoid along the two axes
and Figure 3.9 shows the rear view of the hardware module. The hardware module provides a rigid
base for the braille printer that ensures that the system remains stable.
Figure 3.8: Front view of hardware module
Figure 3.9: Rear view of the hardware module
Department of Electronics and Instrumentation Engineering, 2021
Page 20
RV College of Engineering®, Bengaluru-560059
CHAPTER 4
IMPLEMENTATION
Department of Electronics and Instrumentation Engineering, 2021
Page 21
RV College of Engineering®, Bengaluru-560059
CHAPTER 4
IMPLEMENTATION
4.1 Platform
Raspberry Pi is a low-cost microcontroller having a small size that makes it versatile to be used
in various different embedded systems applications. Raspberry Pi can accomplish most of the
tasks that are expected from a personal computer, right from connecting to the internet to
capturing images by making use of the easy to connect camera port present on-board. Raspberry
Pi is compatible with a lot of peripheral devices and also has built-in USB ports that can be used
to connect the devices using the plug and play functionality. Due to the ease of use of Raspberry
Pi it has been used in this project. The programming language supported by Raspberry Pi is
Python programming language. Python programming is a helpful language that does not have
rigid syntactical rules when compared to other programming languages like C or C++. Python
also has a wide variety of packages that can be easily imported according to the needs of the
application.
4.2 Algorithm for converting speech to text
4.2.1 Algorithm to convert speech from audio file to text
STEP 1: Import all the packages.
STEP 2: Open the audio file.
STEP 3: Initialize the speech recognizer.
STEP 4: Load the audio data.
STEP 5: Convert the speech into text using Google speech recognition.
STEP 6: The converted text is stored into a text file.
STEP 7: END
Department of Electronics and Instrumentation Engineering, 2021
Page 22
RV College of Engineering®, Bengaluru-560059
Figure 4.2.1: Flowchart to convert audio file to text
Figure 4.2.1 shows the steps to be followed in order to convert audio file to text.
4.2.2 Algorithm to convert speech from microphone to text:
STEP 1: Import all the packages.
STEP 2: Initialize the speech recognizer.
STEP 3: Use the microphone as the source of input.
STEP 4: Wait for one second to allow the recognizer to adjust the energy threshold based on the
surrounding noise levels.
STEP 5: Listen to the user’s input and convert speech into text using Google speech recognition.
STEP 6: The converted text is stored into a text file.
STEP 7: END
Department of Electronics and Instrumentation Engineering, 2021
Page 23
RV College of Engineering®, Bengaluru-560059
Figure 4.2.2: Flowchart to convert speech from microphone to text
Figure 4.2.2 shows the steps to be followed in order to convert speech from microphone to text.
4.3 Algorithm to convert image to text
STEP 1: Import all the packages.
STEP 2: Open the image containing text.
STEP 3: Use the function to convert image to text from the library.
STEP 4: Save the text into a text file.
STEP 6: END
Department of Electronics and Instrumentation Engineering, 2021
Page 24
RV College of Engineering®, Bengaluru-560059
Figure 4.3: Flowchart to convert image to text
Figure 4.3 shows the steps to be followed in order to convert image to text.
4.4 Algorithm to convert text to braille
STEP 1: Initialize the speech recognizer.
STEP 2: Use the microphone as the source of input.
STEP 3: Wait for one second to allow the recognizer to adjust the energy threshold based on the
surrounding noise levels.
STEP 4: Listen to the user’s input and convert speech into text using Google speech recognition.
STEP 5: The converted text is stored into a text file.
STEP 6: END
Department of Electronics and Instrumentation Engineering, 2021
Page 25
RV College of Engineering®, Bengaluru-560059
Figure 4.4: Flowchart to convert text to braille
Figure 4.4 shows the steps to be followed in order to convert text to braille.
4.5 Algorithm to convert text to speech
STEP 1: Import the required module for text to speech conversion.
STEP 2: Pass text to gTTS object that is an interface to Google Translate’s Text to Speech API.
STEP 3: Save the audio file and play.
STEP 4: END
Department of Electronics and Instrumentation Engineering, 2021
Page 26
RV College of Engineering®, Bengaluru-560059
Figure 4.5: Flowchart to convert text to speech
Figure 4.5 shows the steps to be followed in order to convert text to speech.
Department of Electronics and Instrumentation Engineering, 2021
Page 27
RV College of Engineering®, Bengaluru-560059
CHAPTER 5
RESULTS
Department of Electronics and Instrumentation Engineering, 2021
Page 28
RV College of Engineering®, Bengaluru-560059
CHAPTER 5
RESULTS
5.1 Speech to text
All the necessary packages are imported after downloading them. The audio file that has been
stored with the .wav extension is opened. In Figure 5.1, the audio file is stored as “demo.wav”.
Once the audio file is opened, the speech recognizer is initialized. The audio data from the audio
file is then loaded. The Google speech recognition package converts the text present in the audio
file into text. The text that is generated has then been printed onto the console. The generated
text can then be stored in a text file for reference. The speechToText() function is called in order
to convert the speech into text.
Figure 5.1: Speech to text
Department of Electronics and Instrumentation Engineering, 2021
Page 29
RV College of Engineering®, Bengaluru-560059
5.2 Image to text and braille
All the necessary packages are imported after downloading them. The image file with the .jpeg
extension is then opened. As shown in Figure 5.2, the text present in the image to be converted
into text is “This is braille script”. The imageToText() function is called in order to convert the
image into text. The text is then displayed onto the console. The text can also be stored into a
text file for future reference. The text present in the text file can then be converted into braille
alphabets and printed on the screen by calling the textToBraille(text) function with the text to be
converted as the function argument. Figure 5.2 also shows the text as well as braille output of the
image.
Figure 5.2: Image to text and braille
5.3 Text to speech
All the necessary packages are imported after downloading them. In order to convert the text into
speech, the textToSpeech(text) function is called as shown in Figure 5.3. The parameter that is
passed to the function is the text that is to be converted into speech. gTTS library then generates
an audio file with the .mp3 extension. The audio file is then saved as “welcome.mp3”. The audio
file is then played by using the system() function.
Department of Electronics and Instrumentation Engineering, 2021
Page 30
RV College of Engineering®, Bengaluru-560059
Figure 5.3: Text to speech
Department of Electronics and Instrumentation Engineering, 2021
Page 31
RV College of Engineering®, Bengaluru-560059
CHAPTER 6
CONCLUSION AND FUTURE SCOPE
Department of Electronics and Instrumentation Engineering, 2021
Page 32
RV College of Engineering®, Bengaluru-560059
CHAPTER 6
CONCLUSION AND FUTURE SCOPE
6.1 Conclusion
In this project, a combination of hardware and software systems is being proposed to help the
visually impaired people. This device converts various inputs like speech and image into braille
output. It must be ensured that visually impaired students have access to ample amounts of good
quality educational resources. They must be able to obtain the required course material quickly so
that there is minimum waiting time. Since they would be shaping the future of the country, wemust
leave no stone unturned in order to support them by providing them with the support that they
need. The proposed device will be capable of fulfilling these requirements of the students.
This project makes use of a microphone module which is used to obtain the speech input that is
to be converted into braille script. The speech input is stored as a wav file. A camera module also
allows images to be captured, specifically, the images of the text that is to be converted into braille
script as a jpeg file. The audio files and images thus obtained are then converted into text files
containing the text to be converted. This is accomplished by making use of the speech recognition
package and the pytesseract package for the audio to text and image to text conversion
respectively. The text file is then converted to a braille script by making use of algorithms that are
implemented by using Python programming and Raspberry Pi. The braille output is then sent to
the hardware module which embosses the alphabets onto the braille paper. The audio files, images
and text files can be saved in the cloud for future reference. Therefore, such a device can prove to
be very helpful to visually impaired students and can help in their education.
6.2 Future scope
To further help the visually impaired students,
● A bidirectional system which converts braille to speech can be implemented so that there
is an audio output when the braille script is the input.
● Regional language capabilities can also be incorporated to facilitate communication in
respective regional languages.
● The system can be integrated with IoT to provide remote access to different documents.
● A more compact version of the device can be designed for better portability.
Department of Electronics and Instrumentation Engineering, 2021
Page 33
RV College of Engineering®, Bengaluru-560059
REFERENCES
[1] Hima Pradeep V, Jeevan K M and Miji Jacob, “Device for Text to Speech Production and to
Braille Script”, International Journal of Electronics and Communication Engineering &
Technology (IJECET), Volume 5, Issue 12, December (2014), pp. 174-179
[2] Swathi Subhash, Shreya Guru, Payal. P. Jain, Sushma, Dr. Ravi Kumar
M.G, “Speech to Braille Convertor for Visually Impaired Using Python”, International Journal of
Advance Science and Technology, Vol. 29, No. 10S, (2020), pp.3916-3921
[3] Dr.V. Ajantha Devi., Conversion of Speech to Braille: Interaction device for Visual and
Hearing Impaired, 2017 4th International Conference on Signal Processing, Communications and
Networking (ICSCN -2017), March 16 – 18, 2017, Chennai, India
[4] Bijet Maynoher Samal , K.Parvathi, Jitendra Kumar Das, “A Bidirectional Text Transcription
of Braille for Odia, Hindi, Telugu and English via Image Processing on FPGA”, IJRET:
International Journal of Research in Engineering and Technology, Volume: 04 Issue: 07 | July2015, pp. 483-494
[5] Jie Li et al.(2010). “Optical Braille Recognition with Haar Wavelet Features and SupportVectorMachine.” International Conference on Computer, Mechatronics, Control and Electronic
Engineering (CMCE)
Department of Electronics and Instrumentation Engineering, 2021
Page 34
RV College of Engineering®, Bengaluru-560059
[6] Blenkhorn, P., & Evans, G. (2001). Automated Braille production from word-processed
documents. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 9(1), 81–85
[7] Padmavathi, S., Reddy, S.S., Meenakshy, D: Conversion of Braille to text in English, Hindi
and Tamil languages. Int. J. Comput. Sci. Eng. Appl. 3(3), 19–32 (2013)
[8] Kaustubh
Bawdekar,
Ankit
Kumar
and
Rajkrishna
Das,
Text
to
Braille
Converter,International Journal of Electronics and Communication Engineering and Technology
(IJECET),Volume7, Issue 4, July-August 2016, pp. 54–61
[9] Foysal Ahmed, Abu Raihan Choudhury “An IoT Based System for Printing Braille Letter
from Speech”,2020 IEEE Region 10 Symposium (TENSYMP), 5-7 June 2020, Dhaka,
Bangladesh.
[10] T. Dasgupta and A. Basu, "A speech enabled Indian language text to Braille transliteration
system," 2009 International Conference on Information and Communication Technologies and
Development (ICTD), Doha, 2009, pp. 201-211.
[11] M. Ramĺrez, M. Sotaquirá, A. De La Cruz,,"An automatic speech recognition system for
helping visually impaired children to learn Braille," 2016 XXI Symposium on Signal Processing,
Images and Artificial Vision (STSIVA), Bucaramanga, 2016, pp. 1-4.
[12] P.H.Zope,Harshal Dahake,”Design and implementation of messaging System using Braille
Code for Visually Impaired Persons”,International Journal of Advanced Research in Electrical
,Electronics and Instrumentation Engineering,Vol.5,Issue 7, July 2016.
Department of Electronics and Instrumentation Engineering, 2021
Page 35
RV College of Engineering®, Bengaluru-560059
[14] A.Mathivani,R.Karthika,K.Manimekalai and P.Rajesh Kumar, "Braille language converter
for visually impaired people",International Journal of intellectual advancements and research in
Engineering Computations",Vol 6, Issue2.
[15] S.R.Rupanagudi, S.Huddar, V.G. Bhat, Suman S. Patil, Bhaskar M.K,“Novel Methodology
for Kannada Braille to Speech Translation using Image Processing on FPGA”. Advances in
Electrical Engineering (ICAEE), International Conference 2014.
Department of Electronics and Instrumentation Engineering, 2021
Page 36
RV College of Engineering®, Bengaluru-560059
APPENDIX
Code for Braille library which contains all the necessary functions:
import speech_recognition as sr
import numpy as np
import os
from gtts import gTTS
from PIL import Image
from pytesseract import image_to_string
import matplotlib.pyplot as plt
import PIL
charToArray = {
" " : [[0,0],[0,0],[0,0]],
"a" : [[1,0],[0,0],[0,0]],
"b" : [[1,0],[1,0],[0,0]],
"c" : [[1,1],[0,0],[0,0]],
"d" : [[1,1],[0,1],[0,0]],
"e" : [[1,0],[0,1],[1,0]],
"f" : [[1,1],[1,0],[0,0]],
"g" : [[1,1],[1,1],[0,0]],
"h" : [[1,0],[1,1],[0,0]],
"i" : [[0,1],[1,0],[1,0]],
"j" : [[0,1],[1,1],[0,0]],
"k" : [[1,0],[0,0],[1,0]],
"l" : [[1,0],[1,0],[1,0]],
"m" : [[1,1],[0,0],[1,0]],
"n" : [[1,1],[0,1],[1,0]],
"o" : [[1,0],[0,1],[1,1]],
"p" : [[1,1],[1,0],[1,0]],
Department of Electronics and Instrumentation Engineering, 2021
Page 37
RV College of Engineering®, Bengaluru-560059
"q" : [[1,1],[1,1],[1,0]],
"r" : [[1,0],[1,1],[1,0]],
"s" : [[0,1],[1,0],[1,0]],
"t" : [[0,1],[1,1],[1,0]],
"u" : [[1,0],[0,0],[1,1]],
"v" : [[1,0],[1,0],[1,1]],
"w" : [[0,1],[0,1],[1,1]],
"x" : [[1,1],[0,0],[1,1]],
"y" : [[1,1],[0,1],[1,1]],
"z" : [[1,0],[0,1],[1,1]]
}
ascii_braille = {}
asciicodes = [' ','!','"','#','$','%','&','','(',')','*','+',',' ,'-','.','/',
'0','1','2','3','4','5','6','7','8','9',':',';','<','=','>','?','@',
'a','b','c','d','e','f','g', 'h','i','j','k','l','m','n','o','p','q',
'r','s','t','u','v','w','x','y','z','[','\\',']','^','_']
⠫',
brailles = [' ','⠮','⠐','⠼','
'⠩','⠯','⠄','⠷','⠾','⠡','⠬','⠠','⠤','⠨','⠌','⠴','⠂','⠆','⠒','⠲','⠢',
'⠖','⠶','⠦','⠔','⠱','⠰','⠣','⠿','⠜','⠹','⠈','⠁','⠃','⠉','⠙','⠑','⠋','⠛','⠓','⠊','⠚','⠅',
'⠇','⠍','⠝','⠕','⠏','⠟','⠗','⠎','⠞','⠥','⠧','⠺','⠭','⠽','⠵','⠪','⠳','⠻','⠘','⠸']
arrayLength = len(asciicodes)
counter = 0
while counter < arrayLength:
ascii_braille[asciicodes[counter]] = brailles[counter]
counter = counter + 1
def speechToText():
filename = "demo_2.wav"r =
sr.Recognizer()
with sr.AudioFile(filename) as source:
Department of Electronics and Instrumentation Engineering, 2021
Page 38
RV College of Engineering®, Bengaluru-560059
# listen for the data (loading audio to memory)
audio_data = r.record(source)
# recognize (convert from speech to text)
text = r.recognize_google(audio_data)
return (str(text))
# Obtaining audio from microphone and converting into text
# rec = sr.Recognizer()
# mic = sr.Microphone()
# with mic as source:
#
#
rec.adjust_for_ambient_noise(source)
#
audio = rec.listen(source)
return(str(rec.recognize_wit(audio, wit_api_key)))
def textToBraille(text):
final_string = ''
for char in text:
char = char.lower()
if char == "a":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["a"]))
elif char == "b":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["b"]))
elif char == "c":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["c"]))
elif char == "d":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["d"]))
elif char == "e":
Department of Electronics and Instrumentation Engineering, 2021
Page 39
RV College of Engineering®, Bengaluru-560059
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["e"]))
elif char == "f":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["f"]))
elif char == "g":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["g"]))
elif char == "h":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["h"]))
elif char == "i":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["i"]))
elif char == "j":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["j"]))
elif char == "k":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["k"]))
elif char == "l":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["l"]))
elif char == "m":
Department of Electronics and Instrumentation Engineering, 2021
Page 40
RV College of Engineering®, Bengaluru-560059
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["m"]))
elif char == "n":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["n"])
elif char == "o":
str(charToArray["w"]
))
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["x"]))
elif char == "y":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["y"]))
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["o"]))
elif char == "p":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["p"]))
elif char == "q":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["q"]))
elif char == "r":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["r"]))
elif char == "s":
Department of Electronics and Instrumentation Engineering, 2021
Page 41
RV College of Engineering®, Bengaluru-560059
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["s"]))
elif char == "t":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["t"]))
elif char == "u":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["u"]))
elif char == "v":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["v"]))
elif char == "w":
final_string = final_string + ascii_braille[char]
print(char + " "
elif char == "x":
elif char == "z":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray["z"]))
elif char == " ":
final_string = final_string + ascii_braille[char]
print(char + " " + str(charToArray[" "]))
print(final_string)
def speechToBraille():
textToBraille(speechToText())
def textToSpeech(text_1):
from gtts import gTTS
Department of Electronics and Instrumentation Engineering, 2021
Page 42
RV College of Engineering®, Bengaluru-560059
# This module is imported so that we can
# play the converted audio
import os
# The text that must be converted to audio
mytext = ' This is text to speech conversion demo for the minor project. We are from 6th
semester E.I.E.'
# Language in which text is to be converted
language = 'en'
# Passing the text and language to the engine
myobj = gTTS(text=mytext, lang=language)
# Saving the converted audio in a mp3 file named
# welcome.mp3
myobj.save("welcome.mp3")
# Playing the converted file
os.system("mpg321 welcome.mp3")
def imageToText():
img=Image.open('C:/Users/admin/Desktop/Braille_Script.jpg')
text=tess.image_to_string(img)
print(text)
file1=open('C:/Users/admin/Desktop/Trial.txt','w')
file1.write(text)
braille.textToBraille(text)print(text)
Department of Electronics and Instrumentation Engineering, 2021
Page 43
RV College of Engineering®, Bengaluru-560059
Hardware design with measurements:
Figure A.1: Hardware module structure
Figure A.2: Solenoid holder
Department of Electronics and Instrumentation Engineering, 2021
Page 44
RV College of Engineering®, Bengaluru-560059
Figure A.3: Y-axis holder (support for shafts)
Figure A.4: Stepper motor holder
Department of Electronics and Instrumentation Engineering, 2021
Page 45
Download