You are on page 1of 13

TEXT TO - SPEECH

BY

V.KALAIVANI

CONTENTS
Objective
Design

View
Reading PDF files
Reading Document file
File Extension Filter
Output

OBJECTIVE
Text-to-Speech

is an application to convert
the given text to speech

The

text given may be entered by the user


at the run time or the user can choose file
from the system

This

application helps user to type text


and get it in the format of audio

DESIGN VIEW

READING PDF DOCUMENTS


In

order to grab the contents of pdf file into


textarea, we have to convert the pdf into text files
To do so, we have to use a .jar file called itextpdf
and install it in project.
Itext is an open source library that allows us to
create and manipulate the pdf files.
We also have to import the following in program,
import

com.itextpdf.text.pdf.PdfReader;
Import com.itextpdf.text.pdf.parser.PdfTextExtractor;

READING DOCUMENT FILES


In

order to grab the contents of document file into


textarea, we have to convert the document into text
files
To do so, we have to use a .jar file called apache
and install it in project.
The Apache POI Project's mission is to create and
maintain Java APIs for manipulating various file
format. We can read and write MS Word files using
Java.
We also have to import the following in program,
import
org.apache.poi.xwpf.extractor.XWPFWordExtractor;
import org.apache.poi.xwpf.usermodel.XWPFDocument;

FILE EXTENSION FILTER


In Swing, we can do that by using method
addChoosableFileFilter(FileFilterfilter) of the
class JFileChooser.
We are going to read only text, documents and
pdf , so we are going to add filter to filter and
show only such files in the Browse dialog box.
The import files,
import
javax.swing.filechooser.FileNameExtensionFilter;

OUTPUT

THANK YOU

You might also like