Beruflich Dokumente
Kultur Dokumente
A PROJECT REPORT ON
Bachelor of Engineering
In
Computer Science & Engineering
By
GIRISH - 1BG07CS023
NIKHIL R - 1BG07CS054
A PROJECT REPORT ON
Bachelor of Engineering
In
Computer Science & Engineering
By
GIRISH - 1BG07CS023
NIKHIL R - 1BG07CS054
Certificate
Certified that the project work entitled Voice based security system (VBSS) is a
bonafide work carried out by
1. GIRISH 1BG07CS023
2. NIKHIL.R 1BG07CS054
2.
ACKNOWLEDGEMENT
Acknowledging the efforts of everyone involved in the project is a difficult job, albeit a very
interesting one. Words cannot completely convey our heart feeling.
We also sincerely thank our beloved Dr. Ranga Dean, for his co-operation and
encouragement at all moments of my approach.
We would also like to thank our parents and well-wishers as well as our dear
classmates for their guidance and their kind co-operation.
NIKHIL .R GIRISH
ABSTRACT
Today password is going to be the major security factor which is porn to hackers. The
password is not sufficient enough today to secure critical data. The security system based on
the voice will analyze the pitch and word and compares it with the data inside the system and
recognizes the user and shows his own data. Personal information like the banking passwords,
Bank amount details, Intelligence Data, Criminal data, Case Files of the Lawyers, Critical
Defense information… etc., can be stored based on the Voice data.
Block Diagram
Acknowledgement I
Abstract II
List of Figures VI
1. Introduction 1
3.1 Introduction 27
4.1 Introduction 38
5. Implementation
6. System Testing
6.1 Introduction 62
7. User Manual
7.4 MySql 73
8. Screen Shots 75
10. Conclusions 85
11. Bibliography 87
Figure# Page#
Fig 2.3 Picture showing two tier and Three tier models 15
Fig 3.3 Class diagram will show association between the classes. 33
Fig 5.2 Picture showing the code for phoneme conversion stage of the algorithm 59
Fig 5.3 Picture showing the code for setting different security levels 60
Fig 7.1 Picture showing the different stages for running Oracle 10g XE 72
Fig 7.2 Picture showing the different stages for running MySql 73
INTRODUCTION
Chapter 1 Introduction
INTRODUCTION
1|Page
Department of CSE, BNMIT 2010-2011
Chapter 1 Introduction
ADMIN MODULE – This module is used for administrator to add, modify remove and
admin password.
UTILITY - This module is to generate voice tags and compare voice tags.
USERLOCKER1 -This module is dedicated to all users who login successfully and
2|Page
Department of CSE, BNMIT 2010-2011
Chapter 1 Introduction
3|Page
Department of CSE, BNMIT 2010-2011
CHAPTER 2
LITERATURE SURVEY
Chapter 2 Literature Survey
LITERATURE SURVEY
For the successful completion of the project, requisite amount of knowledge about the
domain and tools to be used is very essential. A brief overview of the literature survey for the
project is given below:
Overview of java.
Object oriented.
JDBC Connectivity.
Oracle.
MySql.
Netbeans.
Threads.
Exception handling.
Normalization.
4|Page
Department of CSE, BNMIT 2010-2011
Chapter 2 Literature Survey
Except for those constraints imposed by the Internet environment, Java gives the
programmer, full control.
Portability
The key that allows the Java to solve the security and portability problems is that the
output of Java compiler is Byte code. Byte code is a highly optimized set of instructions
designed to be executed by the Java run-time system, which is called the Java Virtual
Machine (JVM). That is, in its standard form, the JVM is an interpreter for byte code.
Although Java was designed for interpretation, there is technically nothing about Java
that prevents on-the-fly compilation of byte code into native code. Sun has just completed its
Just In Time (JIT) compiler for byte code. When the JIT compiler is a part of JVM, it
compiles byte code into executable code in real time, on a piece-by-piece, demand basis. It is
not possible to compile an entire Java program into executable code all at once, because Java
performs various run-time checks that can be done only at run time. The JIT compiles code,
as it is needed, during execution.
5|Page
Department of CSE, BNMIT 2010-2011
Chapter 2 Literature Survey
Beyond the language, there is the Java virtual machine. The Java virtual machine is an
important element of the Java technology. The virtual machine can be embedded within a web
browser or an operating system. Once a piece of Java code is loaded onto a machine, it is
verified. As part of the loading process, a class loader is invoked and does byte code
verification makes sure that the code that’s has been generated by the compiler will not
corrupt the machine that it’s loaded on. Byte code verification takes place at the end of the
compilation process to make sure that is all accurate and correct. So byte code verification is
integral to the compiling and executing of Java code.
Overall Description
CODE
Picture showing the development process of JAVA Program
Java programming uses to produce byte codes and executes them. The first box
indicates that the Java source code is located in a. Java file that is processed with a Java
compiler called javac. The Java compiler produces a file called a. class file, which contains
the byte code. The. Class file is then loaded across the network or loaded locally on your
machine into the execution environment is the Java virtual machine, which interprets and
executes the byte code.
6|Page
Department of CSE, BNMIT 2010-2011
Chapter 2 Literature Survey
The JDBC API supports both two-tier and three-tier models for database access. In the
two-tier model, a Java applet or application talks directly to the database. This requires a
JDBC driver that can communicate with the particular database management system being
accessed. A user's SQL statements are delivered to the database, and the results of those
statements are sent back to the user. The database may be located on another machine to
which the user is connected via a network. This is referred to as a client/server configuration,
with the user's machine as the client, and the machine housing the database as the server.
DBMS-proprietary protocol
Database server
DBMS
In the three-tier model, commands are sent to a "middle tier" of services, which then
send SQL statements to the database. The database processes the SQL statements and sends
the results back to the middle tier, which then sends them to the user. MIS directors find the
three-tier model very attractive because the middle tier makes it possible to maintain control
over access and the kinds of updates that can be made to corporate data. Another advantage is
that when there is a middle tier, the user can employ an easy-to-use higher-level API which is
translated by the middle tier into the appropriate low-level calls. Finally, in many cases the
three-tier architecture can provide performance advantages. Until now the middle tier has
typically been written in languages such as C or C++, which offer fast performance. However, with
the introduction of optimizing compilers that translate Java byte code into efficient machine-specific
code, it is becoming practical to implement the middle tier in Java. This is a big plus, making it
possible to take advantage of Java's robustness, multithreading, and security features. JDBC is
important to allow database access from a Java middle tier.
7|Page
Department of CSE, BNMIT 2010-2011
Chapter 2 Literature Survey
The Java Development Kit (JDK) is a Sun Microsystems product aimed at Java
developers. Since the introduction of Java, it has been by far the most widely used Java SDK.
On 17 November 2006, Sun announced that it would be released under the GNU General
Public License (GPL), thus making it free software. This happened in large part on 8 May
2007; Sun contributed the source code to the OpenJDK.
The JDK has as its primary components a collection of programming tools, including:
java – the loader for Java applications. This tool is an interpreter and can interpret the
class files generated by the javac compiler. Now a single launcher is used for both
development and deployment. The old deployment launcher, jre, no longer comes with
Sun JDK.
javac – the compiler, which converts source code into Java byte code.
jar – the archiver, which packages related class libraries into a single JAR file. This
tool also helps manage JAR files.
javadoc – the documentation generator, which automatically generates documentation
from source code comments
jdb – the debugger
jps – the process status tool, which displays process information for current Java
processes
javap – the class file disassembler.
appletviewer – this tool can be used to run and debug Java applets without a web
browser
8|Page
Department of CSE, BNMIT 2010-2011
Chapter 2 Literature Survey
The idea of Oracle 10g is that the database will be able to dynamically "requisition"
resources from the grid to meet levels of peak demand.
Other enhancements for Oracle 10g are aimed at reducing costs and improving
the quality of service by making the database easier to deploy and manage including
2.5.1 JDBC
JDBC is a Java API for executing SQL statements. (As a point of interest, JDBC is a
trademarked name and is not an acronym; nevertheless, JDBC is often thought of as standing
for Java Database Connectivity. It consists of a set of classes and interfaces written in the Java
programming language. JDBC provides a standard API for tool/database developers and
makes it possible to write database applications using a pure Java API.
Using JDBC, it is easy to send SQL statements to virtually any relational database.
One can write a single program using the JDBC API, and the program will be able to send
SQL statements to the appropriate database. The combinations of Java and JDBC lets a
programmer write it once and run it anywhere.
9|Page
Department of CSE, BNMIT 2010-2011
Chapter 2 Literature Survey
The JDBC API supports both two-tier and three-tier models for database access. In the
two-tier model, a Java applet or application talks directly to the database. This requires a
JDBC driver that can communicate with the particular database management system being
accessed. A user's SQL statements are delivered to the database, and the results of those
statements are sent back to the user. The database may be located on another machine to
which the user is connected via a network. This is referred to as a client/server configuration,
with the user's machine as the client, and the machine housing the database as the server.
DBMS-proprietary protocol
Database server
DBMS
In the three-tier model, commands are sent to a "middle tier" of services, which then
send SQL statements to the database. The database processes the SQL statements and sends
the results back to the middle tier, which then sends them to the user. MIS directors find the
three-tier model very attractive because the middle tier makes it possible to maintain control
over access and the kinds of updates that can be made to corporate data. Another advantage is
that when there is a middle tier, the user can employ an easy-to-use higher-level API which is
translated by the middle tier into the appropriate low-level calls. Finally, in many cases the
three-tier architecture can provide performance advantages. Until now the middle tier has
typically been written in languages such as C or C++, which offer fast performance. However, with
the introduction of optimizing compilers that translate Java byte code into efficient machine-specific
code, it is becoming practical to implement the middle tier in Java. This is a big plus, making it
possible to take advantage of Java's robustness, multithreading, and security features. JDBC is
important to allow database access from a Java middle tier.
10 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 Literature Survey
2.6 MYSQL
What is MySQL?
MySQL is a open source Relational Database Management System. It is very
fast reliable and flexible Database Management System. It provides a very high performance
and it is multi-threaded and multi user Relational Database management system. It is one of
the most popular relational database Management System on the web. The MySQL Database
has become the world's most popular open source Database, because it is free and available on
almost all the platforms. The MySQL can run on Unix, window, and Mac OS. MySQL is used
for the internet applications as it provides good speed and is very secure. It was developed to
manage large volumes of data at very high speed to overcome the problems of existing
solutions. MySQL can be used for verity of applications but it is mostly used for the web
applications on the internet.
Starting with Connector/J 3.1.0, the JDBC driver will issue warnings or throw Data
Truncation exceptions as is required by the JDBC specification unless the connection was
configured not to do so by using the property jdbcCompliantTruncation and setting it to false.
When you are using JDBC outside of an application server, the DriverManager class manages
the establishment of Connections.
The DriverManager needs to be told which JDBC drivers it should try to make
Connections with. The easiest way to do this is to use Class.forName() on the class that
implements the java.sql.Driver interface. With MySQL Connector/J, the name of this class is
com.mysql.jdbc.Driver. With this method, you could use an external configuration file to supply
the driver class name and driver parameters to use when connecting to a database.
11 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 Literature Survey
The NetBeans IDE is written in Java and can run anywhere a JVM is installed, including
Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality,
but is not required for development in other programming languages.
The NetBeans platform allows applications to be developed from a set of modular software
components called modules. Applications based on the NetBeans platform (including the
NetBeans IDE) can be extended by third party developers.
Applications can install modules dynamically. Any application can include the Update Center
module to allow users of the application to download digitally-signed upgrades and new
features directly into the running application. Reinstalling an upgrade or a new release does
not force users to download the entire application again.
The platform offers reusable services common to desktop applications, allowing developers to
focus on the logic specific to their application. Among the features of the platform are:
12 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 Literature Survey
THREADS
A thread is a program's path of execution. Most programs written today run as a
single thread, causing problems when multiple events or actions need to occur at the same
time. Let's say, for example, a program is not capable of drawing pictures while reading
keystrokes. The program must give its full attention to the keyboard input lacking the ability
to handle more than one event at a time. The ideal solution to this problem is the seamless
execution of two or more sections of a program at the same time. Threads allow us to do this.
Multithreaded applications deliver their potent power by running many threads concurrently
within a single program. From a logical point of view, multithreading means multiple lines of
a single program can be executed at the same time, however, it is not the same as starting a
program twice and saying that there are multiple lines of a program being executed at the
same time. In this case, the operating system is treating the programs as two separate and
distinct processes. Under UNIX, forking a process creates a child process with a different
address space for both code and data. However, fork () creates a lot of overhead for the
operating system, making it a very CPU-intensive operation. By starting a thread instead, an
efficient path of execution is created while still sharing the original data area from the parent.
The idea of sharing the data area is very beneficial, but brings up some areas of concern that
we'll discuss later
Creating threads
Java's creators have graciously designed two ways of creating threads: implementing an
interface and extending a class. Extending a class is the way Java inherits methods and
variables from a parent class. In this case, one can only extend or inherit from a single parent
class. This limitation within Java can be overcome by implementing interfaces, which is the
most common way to create threads. (Note that the act of inheriting merely allows the class to
be run as a thread. It is up to the class to start () execution, etc.)
Interfaces provide a way for programmers to lay the groundwork of a class. They are used to
design the requirements for a set of classes to implement. The interface sets everything up,
and the class or classes that implement the interface do all the work. There are a few
differences between a class and an interface. First, an interface can only contain abstract
methods and/or static final variables (constants). Classes, on the other hand, can implement
methods and contain variables that are not constants. Second, an interface cannot implement
any methods. A class that implements an interface must implement all methods defined in that
interface. An interface has the ability to extend from other interfaces, and (unlike classes) can
extend from multiple interfaces. Furthermore, an interface cannot be instantiated with the new
operator; for example, Runnable a=new Runnable (); is not allowed.
13 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 Literature Survey
When an error occurs within a method, the method creates an object and hands it off to the
runtime system. The object, called an exception object, contains information about the error,
including its type and the state of the program when the error occurred. Creating an exception
object and handing it to the runtime system is called throwing an exception.
After a method throws an exception, the runtime system attempts to find something to handle
it. The set of possible "something’s" to handle the exception is the ordered list of methods that
had been called to get to the method where the error occurred. The list of methods is known as
the call stack
Advantages of exceptions
The use of exceptions to manage errors has some advantages over traditional error-
management techniques.
14 | P a g e
Department of CSE, BNMIT 2010-2011
CHAPTER 3
SYSTEM ANALYSIS
&
SPECIFICATION
Chapter 2 System analysis & specification
The system is based on the IEEE 2005 paper Voice-to-phoneme conversion algorithms
for the speaker-independent voice-tag applications in embedded platforms. We have
implemented a security system to overcome the difficulties of CPU and Memory space.
16 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 System analysis & specification
VBSS
Current System
Traditionally, HMMs are directly used as the abstract speech representations in voice-
tag applications. This approach has enjoyed considerable success as it is a language
independent and achieves high speech recognition accuracy while maintaining the low CPU
requirement for the HMM-based voice-tag. As long as the targeted number of voice-tags is
restricted to two or three dozen in an application, the memory consumption of this strategy
is acceptable. Another attribute of the HMM-based voice-tag is its speaker-dependence. A
typical enrollment session in speaker-dependent context is very convenient is very
convenient for the user in that it required only a few example utterances to train a voice-tag
HMM that captures both the speech abstraction and the speaker characteristics.
Proposed System
The proposed system is a speaker-independent voice-tag application, hundreds of
voice-tags can be entered to extend a voice enabled phonebook. For user convenience, the
number of example utterances per voice-tag during enrollment must be minimal as informal
user studies indicate that a single example utterance per voice-tag is most desirable.
However, in a speech recognition application with a large number of voice-tags, the
recognition accuracy of each voice-tag is theoretically proportional to its number of
associated example utterances. Thus, in order to achieve acceptable performance, more
than one example utterance is typically employed. For this reason, a compromise of 2-3
example utterance per voice tag is usually chosen. We describe a voice-to-phoneme
algorithm which maximizes user convenience during voice-tag enrollment while improving
recognition accuracy.
17 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 System analysis & specification
Admin must be able to create, modify and delete a user from entering the system.
The user must use the microphone to enter the voice key to enter into the system.
The system must not enter a user with wrong vocal calls.
1. Usability
The system is a secure system which can be usable with two user only admin and user.
2. Reliability
The system is designed as most reliable system by coding generically. All the errors
and exceptions are expected and fixed during the coding.
3. Performance
The system exhibits high performance by utilizing the minimum CPU and memory.
4. Supportability
The system can be supportable across a wide range of platforms including the
embedded platforms.
5. Implementation
The system is implemented in Microsoft Windows Xp Platform on JVM 1.6.
6. Interface
The interface is planned to be GUI on desktop system.
18 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 System analysis & specification
Hardware Requirements
HDD : 80 GB (MIN)
Software Requirements
Programming Language : Java (Version JDK 1.6), Java Media Framework, Netbeans.
19 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 System analysis & specification
System Models
3.5.1 SCENARIOS
The user will register with the system by communicating with the admin. The user will
speak the secret key and stores his profile.
The user will speak the secret key at the system prompt in order to authenticate himself
with the system.
The admin will enter the system by entering the password at the login. The admin will
select the user from the list of users and selects the delete button to delete the user.
The admin will select add new user to add a new user with voice-tag. Then he allows the
user to speak at the voice tag.
The admin will select the edit voice tag. He selects the user from the list. He allows the
user to speak a new voice tag.
20 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 System analysis & specification
Login
Flow of Events 1. The admin will enter the user name and password in the given fields.
2. The admin will click on the login button.
Pre Condition The admin must have a user id and password
21 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 System analysis & specification
3.5.2.3 Dynamic
Fig 3.3. The class diagram will show association between the classes. That is one class holds
the reference to the other class.
22 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 System analysis & specification
23 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 System analysis & specification
VBSS
Ph Decoder
Speech Recognizer
2: Check Authentication
:UI
:UserDAO
3: Ph Decoder
:User 4: Speech Recognizer
:Utility
24 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 2 System analysis & specification
ADMIN1
LOGUSERS
25 | P a g e
Department of CSE, BNMIT 2010-2011
CHAPTER 4
SYSTEM DESIGN
Chapter 4 System Design
SYSTEM DESIGN
4.1 INTRODUCTION
a. Purpose of the System
The main purpose of the system is to design a security system that using voice
biometrics. It must be utilize very low system resources.
b. Design Goal
The system must utilize minimum memory.
The system must utilize minimum CPU resources.
The system must utilize minimum persistent store.
Sequential
Store User
Hypothesis
Phonetic Profiles
Combination
Decoder database
Record Voice
Tag
Retrieve
Profiles
Speech
Recognizer
Comparator
Access Granted / Access Denied
`26 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 4 System Design
This entire module is implemented in a thread where it continuously listens to the voice
by switching on and off the microphone. This module will be provided with the user interface
to record a voice. It includes start, stop and record buttons. This module is support module for
the admin and authentication modules. The admin module uses it in the registration process of
the users. The authentication module will uses it in identification of the users.
This module uses the phonetic decoding using phoneme approach. This module will
analyze the voice and extracts words or sentences from the voice tags. This module is
responsible for converting the listened data into English words by the process called phonetic
decoding. After the decoding process is completed the data will be stored in a database.
This module is responsible for the comparison of present voice tag with the existing
voice tags in the systems. It will take the support of the voice tracking module and the voice
analysis module to compare the voices and read the microphone. The phonetics will be
recognized by the voice Analysis module and speech is recognized by the Voice tracking
module for computations.
This module is used by the administrator of the security system. It is responsible for
registration of users, deleting the existing user. By passing the security for the specific users …
etc., this module will take help from the voice tracking module for registration of new users.
Voice tracking module will provide the interface to read the data and Voice analysis module
will take care of converting into phonetics and stores. This module will also measure the vocal
levels and stores in an integer format. Vocal levels will be calculated by taking the average
frequency at specific time.
`27 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 4 System Design
START
STOP
`28 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 4 System Design
START
RECORD VOICE
UNLOCK
ACCESS DENIED
ACCESS GIVEN
STOP
`29 | P a g e
Department of CSE, BNMIT 2010-2011
CHAPTER 5
IMPLEMENTATION
Chapter 5 Implementation
5. IMPLEMENTATION
The construction of the voice based security system involves in the development of two
major activities:
User interface
Voice processing
User interface is basically an interface between end user and the engine. The UI is a client. It
deals with the outlook of the application. We construct an interface where we can perform
actions like:
The design of UI by first understanding the various features that are needed to be implemented
for the voice based security system application like database, voice processing etc. The UI acts
like a display unit where the user can choose from the different available options.
In the first interface created is login, used to authenticate users based on their voice.
This interface has access to help window, forgot password window and admin window. This
window will authenticate the admin access by verifying admin password, this leads to main
admin window which is used to add, modify, remove and view user information into database.
This also has access to help and log file window to view users login information. As user
successfully log-in, login window will open userlocker window for each user to view user
information and provides interface to personal locker folder. VBSS provides 10 themes for
users to choose and can set different themes for each user.
30 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
Introduction
The Java Media Framework (JMF) is a recent API for Java dealing with real-time
multimedia presentation and effects processing. JMF handles time-based media, media which changes
with respect to time. Examples of this are video from a television source, audio from a raw-audio
format file and animations. The beta JMF 2.0 specification will be used for this report, as they currently
reflect the features that will appear in the final version.
During the input stage, data is read from a source and passed in buffers to the
processing stage. The input stage may consist of reading data from a local capture device (such
as a webcam or TV capture card), a file on disk or stream from the network.
Once the processing stage has applied its transformations to the stream, it
passes the information to the output stage. The output stage may take the stream and pass it to
a file on disk, output it to the local video display or transmit it over the network.
31 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
CaptureDeviceInfo di = null;
The source object returned from the Processor can then be turned into a Player object by calling
Manager.createPlayer(). To capture it to an audio file instead, a DataSink can take the data instead:
DataSink sink;
MediaLocator dest = new MediaLocator("file://output.wav");
try {
sink.open();
sink.start();
} catch (Exception e) {
}
5.3.2Conclusions
JMF is a highly flexible multimedia architecture that shows a lot of promise. In the
future, hopefully Sun will work on making it more stable as well as on documenting the framework and
providing more example code. The support for Audio For Windows (VFW) makes it a good contender
for future multimedia applications. In its current state, it is usable, but the lack of information makes it
difficult to create a complex program.
32 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
Class AdminForm {
public class AdminForm
extends javax.swing.JFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
voice.AdminForm
Adminform class is a JFrameForm class type which contains Admin window implemented
via SWINGS. Admin form has capability of Adding New users, Modifying, Deleting. It also has
ability to playback the voice recorded by USERS. Adminform has special security options for
better security, admin can view and generate users log and change security level according to
the environment of the system.
It also gives capability for administrator to view and update user information.
33 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
Class adminform1 {
public class adminform1
extends javax.swing.JFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
voice.adminform1
34 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
Class User {
public class User
extends java.lang.Objec
java.lang.Object
voice.User
User class is a simple java class that is used to exchange information among the
different VBSS modules. As VBSS has several modules, integration and communication
among classes is difficult hence to overcome this difficulty user class is introduced. User Class
provides a common interface so that data collected by one module can be used by other
effectively.
java.lang.Object
voice.UserDAO
UserDAO class is a simple java class that is used only for data base interaction. This
class is used to insert or create a new user, update or modify existing users, delete users,
retrieve the users information when requested by other modules.
Method Summary
java.util.ArrayList<java.lang.String> getList()
User load(java.lang.String key)
void modify(User user)
void remove(java.lang.String key)
void store(User u)
void UserDAO() }
35 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
Class GoogleTest {
public class GoogleTest
extends java.lang.Object
implements java.lang.Runnable
java.lang.Object
voice.GoogleTest
java.lang.Runnable
GoogleTest is a simple java class that is used to send login email alerts to the users
. As any user logs in, an email alert is sent to notify the login and also googletest class
sends email to user on 5 failed login attempts.
sendSSLMessage
public void sendSSLMessage(java.lang.String[] recipients,
java.lang.String subject,
java.lang.String message,
java.lang.String from)
throws javax.mail.MessagingException
Maps the specified key to the specified value in this hashtable. Neither the key nor the value
can be null.
The value can be retrieved by calling the get method with a key that is equal to the original
key.
First, if there is a security manager, its checkSecurityAccess method is called with the
string "insertProvider."+provider.getName() to see if it's ok to add a new provider. If the
default implementation of checkSecurityAccess is used (i.e., that method is not
overriden), then this will result in a call to the security manager's checkPermission
method with a SecurityPermission("insertProvider."+provider.getName()) permission.
36 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
Class SimpleAudioRecorder {
public class SimpleAudioRecorder
extends java.lang.Thread
java.lang.Object
java.lang.Thread
voice.SimpleAudioRecorder
A target data line is a type of DataLine from which audio data can be read. The most common
example is a data line that gets its data from an audio capture device. (The device is
implemented as a mixer that writes to the target data line.)
An instance of the AudioFileFormat class describes an audio file, including the file type, the file's
length in bytes, the length in sample frames of the audio data contained in the file, and the
format of the audio data.
Writes a stream of bytes representing an audio file of the specified file type to the external file
provided.
37 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
Class Login {
public class Login
extends javax.swing.JFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
voice.Login
Login class is a JFrameForm class type, this is the main class of VBSS . Login class
window is implemented via SWINGS. This class is used by users to login via voice hence this
class provides a simple user interface to record voice- generate voice tag – retrieve stored voice
tag – calculate deviation by comparing voice tags – display appropriate message to users.
38 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
SpVoice SPAI
The SpVoice object brings the text-to-speech (TTS) engine capabilities to applications using
SAPI automation. An application can create numerous SpVoice objects, each independent of and
capable of interacting with the others. An SpVoice object, usually referred to simply as a voice, is
created with default property settings so that it is ready to speak immediately.
Speak Method
The Speak method initiates the speaking of a text string, a text file, an XML file, or a wave
file by the voice.
The Speak method can be called synchronously or asynchronously. When called
synchronously, the method does not return until the text has been spoken; when called asynchronously,
it returns immediately, and the voice speaks as a background process.
When synchronous speech is used in an application, the application's execution is blocked
while the voice speaks, and the user is effectively locked out. This may be acceptable for simple
applications, or those with no graphical user interface (GUI), but when sophisticated user interaction is
intended, asynchronous speaking will generally be more appropriate.
SpVoice.Speak ( Text As String, [Flags As SpeechVoiceSpeakFlags = SVSFDefault] ) As
Long
Parameters
Text
The text to be spoken, or if the SVSFIsFilename flag is included in the Flags parameter, the path of the
file to be spoken.
Flags
A Long variable containing the stream number. When a voice enqueues more than one
stream by speaking asynchronously, the stream number is necessary to associate events with the
appropriate stream.
Remarks
The Speak method inserts a stream into the text-to-speech (TTS) engine's queue, and
returns a stream number, assigned by the engine. This distinguishes the stream from other streams in the
queue. This number is a temporary identifier which functions like an index into the TTS queue. The first
stream spoken into an empty queue will always have a stream number of 1.
39 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
Class Utility {
public class Utility
extends java.lang.Object
java.lang.Object
voice.Utility
Utility is java class, it is the main class of VBSS. Utility class has the main functionality that is
generating voice tags from WAVE file and comparing the two voice tags. Main algorithm of
VBSS is actually implemented in Utility class.
Append
public StringBuilder append(StringBuffer sb)
The principal operations on a StringBuilder are the append and insert methods, which
are overloaded so as to accept data of any type. Each effectively converts a given datum to a
string and then appends or inserts the characters of that string to the string builder. The append
method always adds these characters at the end of the builder; the insert method adds the
characters at a specified point.
For example, if z refers to a string builder object whose current contents are "start", then the
method call z.append("le") would cause the string builder to contain "startle", whereas z.insert(4,
"le") would alter the string builder to contain "starlet".
Instances of StringBuilder are not safe for use by multiple threads. If such
synchronization is required then it is recommended that StringBuffer be used. }
40 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
COMPARE FUNCTION
int compare(T o1,T o2);
Compares its two arguments for order. Returns a negative integer, zero, or a positive
integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that sgn(compare(x, y)) == -sgn(compare(y, x)) for all x and y.
(This implies that compare(x, y) must throw an exception if and only if compare(y, x)
throws an exception.)
The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) &&
(compare(y, z)>0)) implies compare(x, z)>0.
Finally, the implementor must ensure that compare(x, y)==0 implies that sgn(compare(x,
z))==sgn(compare(y, z)) for all z.
It is generally the case, but not strictly required that (compare(x, y)==0) == (x.equals(y)).
Generally speaking, any comparator that violates this condition should clearly indicate
this fact. The recommended language is "Note: this comparator imposes orderings that
are inconsistent with equals."
Parameters:
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal
to, or greater than the second.
Throws:
Class Cast Exception - if the arguments' types prevent them from being
compared by this comparator
41 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
Class HELP {
public class HELP
extends javax.swing.JFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
voice.HELP
HELP class is a JFrameForm class type, it is very useful for new users to get to
know VBSS software. As VBSS software provides a lot of features that is difficult to explore,
hence VBSS HELP will make it easier. HELP Class is made of jTabbedPanel Dividing the help
options. They are :-
GENERAL TAB:-
It contains general features of VBSS and its requirements to run VBSS. It can
also connect to VBSS website to check for new version and download the requirements.
USING VBSS :-
It contains instructions to Install and make VBSS working, and also using of
VBSS in detail.
TEST MICROPHONE :-
This tab is the most important of all because it has ability to check your
microphone automatically and manually , it also helps Users to configure microphone.
VBSS-PROJECT.CO.CC :-
This tab helps user to visit VBSS website for online help and support.
ABOUT US :-
This tab helps user to know about the VBSS project developers. }
42 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
Class logfile {
public class logfile
extends javax.swing.JFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
voice.logfile
Logfile class is a JFrameForm class type. It is used to keep track of the users login
information. This class Collects information from database. As a user logs out of
userlocker1 window, information is inserted into the databse.
USER ID :
NAME :
DATE :
TIME FROM :
TIME TO :
DURATION :
Logfile is designed in such a way that it can sort log contents by user, i.e
administrator can search by name and generate log file.
Logfile has ability to generate logfile so the administrator can print the log file.
43 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
Class userlocker1 {
public class userlocker1
extends javax.swing.JFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
voice.userlocker1
userlocker1 class has capability of sending email as soon as user logs out.
userlocker1 class has secured log out information, i.e locks user personal folder.
userlocker1 class uses BATCH COMMANDS to create personal locker folder. userlocker1
class creates the batch file and executes it and delete as VBSS software process ends.
Using MD <username>
44 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
ATTRIB.exe
45 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
VBSS uses voice to phoneme algorithm to generate voice tags and compare
voice tags. Voice to phoneme algorithm is an efficient algorithm to generate voice tags. In
VBSS, the recorded voice is stored in WAV audio file format because it is the only
uncompressed audio file format. It reads the WAV file using input file stream and converts into
samples i.e. phonemes. These phonemes will then be converted into voice tags using String
Builder.Append. VBSS uses this algorithm in Sequential Hypothesis mode to generate the
voice tags. Every 2500 samples, a voice tag is used.
Fig 5.2, Picture showing the code for phoneme conversion stage of the algorithm
46 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 5 Implementation
VBSS will generate new voice tags from user’s voice and retrieves the stored voice
tags and then compares them using string compare. String compare is an inbuilt string function
to compare two strings and returns the difference in their ASCII value, and this value is used as
deviation in voice tags. VBSS will decide to grant or deny access depending on the deviation
value. VBSS has Set security level feature, which dynamically decides the deviation allowed to
authenticate users.
Security level 0:
Security level 1:
Security level 2:
47 | P a g e
Department of CSE, BNMIT 2010-2011
CHAPTER 6
SYSTEM TESTING
Chapter 6 System Testing
SYSTEM TESTING
Software Testing is the process used to help identify the correctness, completeness,
security, and quality of developed computer software. Testing is a process of technical
investigation, performed on behalf of stakeholders, that is intended to reveal quality-related
information about the product with respect to the context in which it is intended to operate.
This includes, but is not limited to, the process of executing a program or application with the
intent of finding errors. Quality is not an absolute; it is value to some person. With that in mind,
testing can never completely establish the correctness of arbitrary computer software; testing
furnishes a criticism or comparison that compares the state and behavior of the product against
a specification. An important point is that software testing should be distinguished from the
separate discipline of Software Quality Assurance (SQA), which encompasses all business
process areas, not just testing.
There are many approaches to software testing, but effective testing of complex products is
essentially a process of investigation, not merely a matter of creating and following routine
procedure. One definition of testing is "the process of questioning a product in order to evaluate
it", where the "questions" are operations the tester attempts to execute with the product, and the
product answers with its behavior in reaction to the probing of the tester[citation needed].
Although most of the intellectual processes of testing are nearly identical to that of review or
inspection, the word testing is connoted to mean the dynamic analysis of the product—putting
the product through its paces. Some of the common quality attributes include capability,
reliability, efficiency, portability, maintainability, compatibility and usability. A good test is
sometimes described as one which reveals an error; however, more recent thinking suggests
that a good test is one which reveals information of interest to someone who matters within the
project community.
48 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 6 System Testing
6.1 Introduction
In general, software engineers distinguish software faults from software failures. In case
of a failure, the software does not do what the user expects. A fault is a programming error that
may or may not actually manifest as a failure. A fault can also be described as an error in the
correctness of the semantic of a computer program. A fault will become a failure if the exact
computation conditions are met, one of them being that the faulty portion of computer software
executes on the CPU. A fault can also turn into a failure when the software is ported to a
different hardware platform or a different compiler, or when the software gets extended.
Software testing is the technical investigation of the product under test to provide stakeholders
with
Unit tests are maintained along with the rest of the software source code and generally
integrated into the build process (with inherently interactive tests being relegated to a partially
manual build acceptance process).The software, tools, samples of data input and output, and
configurations are all referred to collectively as a test harness.
49 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 6 System Testing
In which each unit (basic component) of the software is tested to verify that
the detailed design for the unit has been correctly implemented. Unit testing verification
efforts on the smaller unit of the software design in the module. This is also known as
‘module’ testing. The modules of the system are tested separately. The testing is carried out
during programming stage itself. In this testing step each module is found to working
satisfactory as regard to the expected output from module. There are some validation checks
for verifying the data input given by the user which both the formal and validity of the
entered. It is very easy to find error debug the system.
This involves launching the application and providing the user with a GUI. In this we test for
actual GUI to be loaded successfully without any panic or exceptions.
Adding a user
This involves adding user ID for the user and other information’s while recording their voice
in the background using thread. After that saving all those information in the database.
This involves removing and modifying the voice tags and other information of the user from
the database.
When the application is exited, it must not raise any panic or exception and it must intern kill
any of the processes belonging to the application. It must reset to the original profile before
application being initiated.
50 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 6 System Testing
Once individual program components of a system have been tested, they must be integrated to
create a partial or complete system. This integration process involves building the system and
testing the resultant system for problems that arises from component integrations. The main
difficulty that arises in integration testing is localizing errors that are discovered during the
process. There are complex interactions between system components and , when an
anomalous output is discovered, it may be hard to find the source of the errors, we should
always should use an increment approach to system integration testing.
In this testing we had to check if on creating new user, the information was stored on the
database and that there were no mistakes. And during the login, information of the legitimate
user is retrieved. On exiting we had to make sure that application traced back to its default
without any error.
This phase of testing involves running the application on the device ant testing to see if the
application is running and without any panics and errors. On device with limited memory we
had to ensure that there was no overflow error or any memory leaks. We had to check if the
API’s use were using were functional on device without any error.
In this phase we checked if the installations occurred successfully without any errors and all
the libraries are added.
In this phase, the voice tags of the voice given during login is compared with the voice tags of
the voice that is given when the user was created. If the deviations are well within the limit,
access is given otherwise access is denied.
51 | P a g e
Department of CSE, BNMIT 2010-2011
Chapter 6 System Testing
Voice Record and Playback Yes It reads voice from user via
microphone and play back the audio
via speakers.
The editor has been thoroughly tested for any bugs that may have crept in our design or
52 | P a g e
Department of CSE, BNMIT 2010-2011
USER MANUAL
User manual
USER MANUAL
Oracle 10g
My SQL.
This user manual describes usage of .jar which are build files,
The vaious steps involved in launching the application on NetBeans are given below:
Using the command prompt is tedious and difficult to launch and run an application and hence
we use only the Netbeans IDE for this purpose as it is very easy and simple for a user. Given
below are the steps involved for launching and running using Netbeans IDE.
53 | P a g e
Department of CSE, BNMIT 2010-2011
User manual
First download and install Oracle 10g XE with any root password.
On Windows, from the Start menu, select Programs (or All Programs), then Oracle
Database 10g Express Edition, and then Go To Database Home Page.
On Linux, click the Application menu (on Gnome) or the K menu (on KDE), then point
to Oracle Database 10g Express Edition, and then Go To Database Home Page.
At the Database Home Page login window, enter the following information:
Click Login.
54 | P a g e
Department of CSE, BNMIT 2010-2011
User manual
Step 1:
USERNAME: SYSTEM
PASSWORD :( SET DURING ORACLE 10G XE INSTALLATION ).
Step 2 :
55 | P a g e
Department of CSE, BNMIT 2010-2011
User manual
Step 3:
USERNAME: VOICE1
PASSWORD: VOICE1
HIT CREATE
56 | P a g e
Department of CSE, BNMIT 2010-2011
User manual
MYSQL
INSTALL MYSQL 5.4 or HIGHER.
CONFIGURE MYSQL:-
USE VBSS;
RUN VBSS.
57 | P a g e
Department of CSE, BNMIT 2010-2011
SCREEN SHOTS
58 | P a g e
Department of CSE, BNMIT 2010-2011
Screen shots
VBSS LOGIN
59 | P a g e
Department of CSE, BNMIT 2010-2011
Screen shots
60 | P a g e
Department of CSE, BNMIT 2010-2011
Screen shots
61 | P a g e
Department of CSE, BNMIT 2010-2011
Screen shots
FORGOT PASSWORD
TEXTURES
62 | P a g e
Department of CSE, BNMIT 2010-2011
Screen shots
VBSS HELP
63 | P a g e
Department of CSE, BNMIT 2010-2011
LIMITATIONS
&
FUTURE
ENHANCEMENTS
LIMITATIONS
Even though VBSS can be used instead of password, which can be easily
It matches only the pitch of the voice and not exactly the word that is spoken.
Administrator cannot change the database username and password, its default.
FUTURE ENHANCEMENTS
Our VOICE TO PHONEME ALGORITHM can be modified for more accuracy and to
overcome limitations.
65 | P a g e
Department of CSE, BNMIT 2010-2011
CONCLUSION
CONCLUSION
We have designed voice based security system which authenticates the users based on
voice instead of password which can be easily hacked. It involves user interface and modules
which converts human speech into abstract representation and retrieves the same when the
user wants to login for the next time. And it checks the deviation, if it is well within the limits
access is granted otherwise will be denied. All these activities is done without the notice of the
user at the background without any user intervention.
The project “voice based security system” was developed as per the requirements and
capabilities allowed for a third party developer. It was developed using Java Development
Tool Kit on the windows platform using oracle/MySQL and NetBeans IDE using java as the
language for coding.
Towards the completion of this project an insight into voice processing in java,
debugging and the installation of the software was gained. This will not only help us in
developing future application but also ease our understanding of new platform involved. Apart
from these, the standard software development methodologies followed gave us a sound
knowledge of how quality software can be developed. An opportunity of how to work in an
organization and to effectively interact was also gained. Finally, we would once again like to
thank everyone involved behind the completion of the project.
67 | P a g e
Department of CSE, BNMIT 2010-2011
Bibliography
Bibliography
Books :
IEEE Papers:
Websites:
1. www.netbeans.org.
2. http://download.oracle.com/javase/tutorial/sound/index.html
3. http://www.oracle.com/
4. http://www.mysql.com/
5. http://stackoverflow.com/
6. www.javabeginner.com
69 | P a g e
Department of CSE, BNMIT 2010-2011