Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ABSTRACT
Here we use
TABLE OF CONTENTS
ii
TABLE OF CONTENTS
CHAPTER NO.
TITLE
PAGE NO.
iii
ABSTRACT
vii
LIST OF FIGURES
xiii
LIST OF ABBREVATION
xiv
1.
INTRODUCTION
02
2.
07
07
07
09
3.
12
4.
SPEECH PROCESSING
38
4.1 Introduction
38
4.2 Sampling
41
4.3 Quantization
4.4 Methodology
42
43
5.
SOFTWARE SUPPORT
56
56
5.1 Text to Speech
56
8.
Applications
9.
Conclusion
10.
REFERENCES
75
CHAPTER-1
INTRODUCTION
The current era belongs to the world of Internet. Internet has become a necessity from its status
of luxury in the recent years. A network exists between people and things but still the interface
between the things and an individual human being is dependent on physical supports such as
remote controls or smartphone apps. In order to overcome such limitations, we have designed
our project to provide an ease of control over various devices connected to the internet using
voice. This provision of voice interface gives the freedom of usage and also eradicates the use of
other control systems thus aiding in an economic and ecofriendly environment. In addition to
control through voice commands our project is also aimed towards providing a voice based
interaction between the computer and humans thus abridging the digital and physical worlds
using a virtual system. This augmentation of different worlds gives rise to a new concept known
as Augmented Reality.
CHAPTER-2
THE BASIC PRINCIPLE
2.1 Block Diagram:
CHAPTER-3
CHAPTER-3
CHAPTER
3
RASPBERRY PI
PTER
4
SPEECH PROCESSING
4 .1 Introduction:
4. 2 Sampling:
CHA
4. 3 Quantization:
4. 4 Methodology:
CHAPTER-4
CHAPTER-4
SERIAL COMMUNICATION
4.1 INTRODUCTION:
Serial communication is basically the transmission or reception of data one
bit at a time. Today's computers generally address data in bytes or some multiple
thereof. A byte contains 8 bits. A bit is basically either a logical 1 or zero. Every
character on this page is actually expressed internally as one byte. The serial port is
used to convert each byte to a stream of ones and zeroes as well as to convert a
stream of ones and zeroes to bytes. The serial port contains a electronic chip called
a Universal Asynchronous Receiver/Transmitter (UART) that actually does the
conversion.
The serial port has many pins. We will discuss the transmit and receive pin
first. Electrically speaking, whenever the serial port sends a logical one (1) a
negative voltage is effected on the transmit pin. Whenever the serial port sends a
logical zero (0) a positive voltage is affected. When no data is being sent, the serial
port's transmit pin's voltage is negative (1) and is said to be in a MARK state. Note
that the serial port can also be forced to keep the transmit pin at a positive voltage
(0) and is said to be the SPACE or BREAK state. (The terms MARK and SPACE
are also used to simply denote a negative voltage (1) or a positive voltage (0) at the
transmit pin respectively).
When transmitting a byte, the UART (serial port) first sends a START BIT
which is a positive voltage (0), followed by the data (general 8 bits, but could be 5,
6, 7, or 8 bits) followed by one or two STOP Bits which is a negative(1) voltage.
The sequence is repeated for each byte sent. Figure 1 shows a diagram of what a
byte transmission would look like.
At this point you may want to know what the duration of a bit is. In other
words, how long does the signal stay in a particular state to define a bit. The
answer is simple. It is dependent on the baud rate. The baud rate is the number of
times the signal can switch states in one second. Therefore, if the line is operating
at 9600 baud, the line can switch states 9,600 times per second. This means each
bit
has
the
duration
of
1/9600
of
second
or
about
100sec.
when transmitting a character there are other characteristics other than the
baud rate that must be known or that must be setup. These characteristics define
the entire interpretation of the data stream. The first characteristic is the length of
the byte that will be transmitted. This length in general can be anywhere from 5 to
8 bits.
The second characteristic is parity. The parity characteristic can be even,
odd, mark, space, or none. If even parity, then the last data bit transmitted will be a
logical 1 if the data transmitted had an even amount of 0 bits. If odd parity, then the
last data bit transmitted will be a logical 1 if the data transmitted had an odd
amount of 0 bits. If MARK parity, then the last transmitted data bit will always be
a logical 1. If SPACE parity, then the last transmitted data bit will always be a
logical 0. If no parity then there is no parity bit transmitted.
The third characteristic is the amount of stop bits. This value in general is 1
or 2. Assume we want to send the letter 'A' over the serial port. The binary
representation of the letter 'A' is 01000001. Remembering that bits are transmitted
from least significant bit (LSB) to most significant bit (MSB), the bit stream
transmitted would be as follows for the line characteristics 8 bits, no parity, 1 stop
bit and 9600 baud.
LSB (0 1 0 0 0 0 0 1 0 1) MSB
The above represents (Start Bit) (Data Bits) (Stop Bit). To calculate the
actual byte transfer rate simply divide the baud rate by the number of bits that must
be transferred for each byte of data. In the case of the above example, each
character requires 10 bits to be transmitted for each character. As such, at 9600
baud, up to 960 bytes can be transferred in one second.
The above discussion was concerned with the "electrical/logical"
characteristics of the data stream. We will expand the discussion to line protocol.
Serial communication can be half duplex or full duplex. Full duplex
communication means that a device can receive and transmit data at the same time.
Half duplex means that the device cannot send and receive at the same time. It can
do them both, but not at the same time. Half duplex communication is all but
outdated except for a very small focused set of applications.
Half duplex serial communication needs at a minimum two wires, signal
ground and the data line. Full duplex serial communication needs at a minimum
three wires, signal ground, transmit data line, and receive data line. The RS232
specification governs the physical and electrical characteristics of serial
communications. This specification defines several additional signals that are
asserted (set to logical 1) for information and control beyond the data signal
These signals are the Carrier Detect Signal (CD), asserted by modems to
signal a successful connection to another modem, Ring Indicator (RI), asserted by
modems to signal the phone ringing, Data Set Ready (DSR), asserted by modems
to show their presence, Clear To Send (CTS), asserted by modems if they can
receive data, Data Terminal Ready (DTR), asserted by terminals to show their
presence, Request To Send (RTS), asserted by terminals if they can receive data.
The section RS232 Cabling describes these signals and how they are connected.
The above paragraph alluded to hardware flow control. Hardware flow
control is a method that two connected devices use to tell each other electronically
when to send or when not to send data. A modem in general drops (logical 0) its
CTS line when it can no longer receive characters. It re-asserts it when it can
receive again. A terminal does the same thing instead with the RTS signal. Another
method of hardware flow control in practice is to perform the same procedure in
the
previous
paragraph
except
that
the
DSR
and
DTR
signals.
Note that hardware flow control requires the use of additional wires. The
benefit to this however is crisp and reliable flow control. Another method of flow
control used is known as software flow control. This method requires a simple 3
wire serial communication link, transmit data, receive data, and signal ground. If
using this method, when a device can no longer receive, it will transmit a character
that the two devices agreed on. This character is known as the XOFF character.
This character is generally a hexadecimal 13. When a device can receive again it
transmits an XON character that both devices agreed to. This character is generally
a hexadecimal 11.
computer should communicate with a peripheral device like a modem. For your
information, DTE means Data Terminal Equipment (computers etc.) where DCE is
the abbreviation of Data Communication Equipment (modems).
One of the main uses of serial communication today where no modem is
involveda serial null modem configuration with DTE/DTE communicationis
not so well defined, especially when it comes to flow control. The terminology null
modem for the situation where two computers communicate directly is so often
used nowadays, that most people don't realize anymore the origin of the phrase and
that a null modem connection is an exception, not the rule.
In history, practical solutions were developed to let two computers talk with
each other using a null modem serial communication line. In most situations, the
original modem signal lines are reused to perform some sort of handshaking.
Handshaking can increase the maximum allowed communication speed because it
gives the computers the ability to control the flow of information. A high amount
of incoming data is allowed if the computer is capable to handle it, but not if it is
busy performing other tasks. If no flow control is implemented in the null modem
connection, communication is only possible at speeds at which it is sure the
receiving side can handle the amount information even under worst case
conditions.
4.3 RS232:
When we look at the connector pin out of the RS232 port, we see two pins
which are certainly used for flow control. These two pins are RTS, request to send
and CTS, clear to send. With DTE/DCE communication (i.e. a computer
communicating with a modem device) RTS is an output on the DTE and input on
the DCE. CTS are the answering signal coming from the DCE.
Before sending a character, the DTE asks permission by setting its RTS
output. No information will be sent until the DCE grants permission by using the
CTS line.
If the DCE cannot handle new requests, the CTS signal will go low. A
simple but useful mechanism allowing flow control in one direction. The
assumption is that the DTE can always handle incoming information faster than the
DCE can send it. In the past, this was true. Modem speeds of 300 baud were
common and 1200 baud was seen as a high speed connection.
For further control of the information flow, both devices have the ability to
signal their status to the other side. For this purpose, the DTR data terminal ready
and DSR data set ready signals are present. The DTE uses the DTR signal to signal
that it is ready to accept information, whereas the DCE uses the DSR signal for the
same purpose. Using these signals involves not a small protocol of requesting and
answering as with the RTS/CTS handshaking. These signals are in one direction
only.
The last flow control signal present in DTE/DCE communication is the CD
carrier detect. It is not used directly for flow control, but mainly an indication of
the ability of the modem device to communicate with its counter part. This signal
indicates the existence of a communication link between two modem devices.
signal ground are cross connected in the null modem communication cable. All
other pins have no connection. An example of such a null modem cable without
handshaking can be seen in the figure below.
Rx
TX
TX
Rx
Signal ground
problem, if either of the two devices checks the DSR or CD inputs. These signals
normally define the ability of the other side to communicate. As they are not
connected, their signal level will never go high. This might cause a problem.
The same holds for the RTS/CTS handshaking sequence. If the software on
both sides is well structured, the RTS output is set high and then a waiting cycle is
started until a ready signal is received on the CTS line. This causes the software to
hang because no physical connection is present to either CTS line to make this
possible. The only type of communication which is allowed on such a null modem
line is data-only traffic on the cross connected Rx/TX lines.
This does however not mean that this null modem cable is useless.
Communication links like present in the Norton Commander program can use this
null modem cable. This null modem cable can also be used when communicating
with devices which do not have modem control signals like electronic measuring
equipment etc.
As you can imagine, with this simple null modem cable no hardware flow control
can be implemented. The only way to perform flow control is with software flow
control using the XOFF and XON characters.
CHAPTER-5
SOFTWARE CODING
#include<reg51.h>
#define voice P1
sbit alarm = P0^7;
TI=1;
}
//DELAY Routine
void delay1(int n)
{
int i;
for(i=0;i<n;i++);
}
void delay2(int n)
{
int i;
for(i=0;i<n;i++)
{
delay1(1000);
}
}
//Main Program
void main(void)
{
P1=0x00;
P0=0x00;
EA=1;
ES=1;
serial_init();//Initialize serial port
while(1);
}
void serial(void) interrupt 4
{
int i;
ch=SBUF;
if(RI==1)
{
if (ch=='Z')
{
for(i=0;i<12;i++)
{
alarm=1;
delay2(10);
alarm=0;
delay2(7);
}
}
else if (ch=='A')
{
voice=0x01;
}
else if (ch=='B')
{
voice=0x02;
}
else if (ch=='C')
{
voice=0x04;
}
else if (ch=='D')
{
voice=0x08;
}
else if (ch=='E')
{
voice=0x10;
}
else if (ch=='F')
{
voice=0x20;
}
else if (ch=='G')
{
voice=0x40;
}
else if (ch=='H')
{
voice=0x80;
}
else
{
P1=0x00;
}
RI=0;
}
}
CHAPTER-6
CHAPTER-6
SOFTWARE TOOLS
6.1 TYPES OF TOOLS:
KEIL C
Flash Magic
ORCAD
Capture
Layout
6.1.1 KEIL C:
Keil software is the leading vendor for 8/16-bit development tools (ranked at
first position in the 2004 embedded market study of the embedded system and EE
times magazine).
Keil software is represented world wide in more than 40 countries, since the
market introduction in 1988; the keil C51 compiler is the de facto industry standard
and supports more than 500 current 8051 device variants. Now, keil software offers
development tools for ARM.
Keil software makes C compilers, macro assemblers, real-time kernels,
debuggers, simulators, integrated environments, and evaluation boards for 8051,
251, ARM and XC16x/C16x/ST10 microcontroller families.
The Keil C51 C Compiler for the 8051 microcontroller is the most popular
8051 C compiler in the world. It provides more features than any other 8051 C
compiler available today.
The C51 Compiler allows you to write 8051 microcontroller applications in
C that, once compiled, have the efficiency and speed of assembly language.
Language extensions in the C51 Compiler give you full access to all resources of
the 8051.
The C51 Compiler translates C source files into relocatable object modules
which contain full symbolic information for debugging with the Vision Debugger
or an in-circuit emulator. In addition to the object file, the compiler generates a
listing file which may optionally include symbol table and cross reference
pdata
instruction
MATLAB
CHAPTER 4
4.1 Introduction to MATLAB:
MATLAB is a high-performance language for technical
computing.
It
integrates
computation,
visualization,
and
Fig
MATLAB is an interactive system whose basic data element
is an array that does not require dimensioning. This allows you to
solve many technical computing problems, especially those with
matrix and vector formulations, in a fraction of the time it would
take to write a program in a scalar non interactive language such
as C or FORTRAN.
Development Environment:
This is the set of tools and facilities that help you use
MATLAB functions and files. Many of these tools are graphical user
interfaces. It includes the MATLAB desktop and command window,
a command history, an editor and debugger, and browsers for
viewing help, the workspace, files, and the search path.
Graphics:
data
visualization,
image
processing,
toolboxes
are
there
in
MATLAB
for
computing
MATLABs
Graphical
User
Interface
Development
A file with extension .m, called a GUI M-file, which contains the
code that controls the GUI operation. This file includes
functions that are called when the GUI is launched and exited,
and callback functions that are executed when a user interacts
with GUI objects for example, when a button is pushed.
To launch GUIDE from the MATLAB command window, type
guide filename
Where filename is the name of an existing FIG-file on the current
path. If filename is omitted,
GUIDE opens a new (i.e., blank) window.
VB 6.0
CHAPTER-7
CHAPTER-7
HARDWARE TOOLS
XStick
Point-to-point topology
point-to-multipoint topology
mesh networking
Low Power
RX Current: 45 mA (@3.3 V)
Easy-to-Use
RF communications
The XBee modules were designed to mount into a receptacle (socket) and
therefore do not require any soldering when mounting it to a board. The XBee-PRO
Development Kits contain RS- 232 and USB interface boards which use two 20-pin
receptacles to receive modules. Figure 4.7.2 XBeePRO Module Mounting to an RS
232 Interface Board.
Serial Data
Data enters the module UART through the DIN (pin 3) as an asynchronous serial
signal. The signal should idle high when no data is being transmitted. Each data
byte consists of a start bit (low), 8 data bits (least significant bit first) and a stop bit
(high). The following figure illustrates the serial bit pattern of data passing through
the module.
The module UART performs tasks, such as timing and parity checking, that are
needed for data communications. Serial communications depend on the two UARTs
to be configured with compatible settings (baud rate, parity, start bits, stop bits,
data bits).
Serial Buffers
The XBee modules maintain small buffers to collect received serial and RF
data, which is illustrated in the figure below. The serial receive buffer collects
incoming serial characters and holds them until they can be processed. The serial
transmit buffer collects data that is received via the RF link that will be transmitted
out the UART.
receiving RF data.
1. If the RF data rate is set higher than the interface data rate of the module,
the module could receive data faster than it can send the data to the host.
2. If the host does not allow the module to transmit data out from the serial
transmit buffer because of being held off by hardware flow control.
2.8.1 Standards: One of the advantages of a serial system is that it lends itself to
transmission over telephone lines. The serial digital data can be converted by
modem, placed onto a standard voice-grade telephone line, and converted back to
serial digital data at the receiving end of the line by another modem. Officially, RS232 is defined as the Interface between data terminal equipment and data
communications equipment using serial binary data exchange.
This definition
defines data terminal equipment (DTE) as the computer, while data communications
equipment (DCE) is the modem. A modem cable has pin-to-pin connections, and is
designed to connect a DTE device to a DCE device.
2.8.2 Interfaces: In addition to communications between computer equipment
over telephone lines, RS-232 is now widely used for direct connections between
data acquisition devices and computer systems. As in the definition of RS-232, the
computer is data transmission equipment (DTE). However, many interface products
are not data communications equipment (DCE).
Null modem cables are designed for this situation; rather than having the pinto-pin connections of modem cables, null modem cables have different internal
wiring to allow DTE devices to communicate with one another.
2.8.3 Cabling Options: RS-232 cables are commonly available with 4, 9 or 25-pin
wiring. The 25-pin cable connects every pin; the 9-pin cables do not include many of
the uncommonly used connections; 4-pin cables provide the bare minimum
connections, and have jumpers to provide handshaking for those devices that
require it. These jumpers connect pins 4, 5 and 8, and also pins 6 and 20.
The advent of the IBM PC AT has created a new wrinkle in RS-232communications.
Rather than having the standard 25-pinconnector, this computer and many new
expansion boards for PCs feature a 9-pin serial port. To connect this port to a
standard 25-pin port, a 9-to-25-pin adaptor cable can be utilized, or the user can
create his own cable specifically for that purpose.
modem cable) or a DTE device to a DCE device (modem cable)? Second, what
connectors are required on each end, male or female, 25-pin or 9-pin (AT style)?
Usually, it is recommended that the user obtain the two devices to be connected,
and then determine which cable is required.
The RS-232 standard (and the COM port) use +12V for logic 0 and 12V for
logic 1.
2.9 Max232:
The MAX232 from Maxim was the first IC which in one package
contains the necessary drivers (two) and receivers (also two), to adapt the RS-232
signal voltage levels to TTL logic. It became popular, because it just needs one
voltage (+5V) and generates the necessary RS-232 voltage levels (approx. -10V and
+10V) internally. This greatly simplified the design of circuitry. Circuitry designers no
longer need to design and build a power supply with three voltages (e.g. -12V, +5V,
and +12V), but could just provide one +5V power supply, e.g. with the help of a
simple 78x05 voltage converter.
The MAX232 has a successor, the MAX232A. The ICs are almost identical, however,
the MAX232A is much more often used (and easier to get) than the original
MAX232, and the MAX232A only needs external capacitors 1/10th the capacity of
what the original MAX232 needs.
V D D
C 2
1 0 u F
1
3
4
5
C 3
1 0 u F
C 4
C
C
C
C
+
1 2 +
2 -
V -
V +
1 IN
2 IN
1 IN
2 IN
R
R
T
T
M A X 2 3 2
U 1
15
R
R
T
T
G N D
T X
1 3
8
1 1
1 0
V C C
R 2 IN
1 0 u F
1 0 u F
16
C 1
1
2
1
2
O
O
O
O
U
U
U
U
T
T
T
T
1 2
9
1 4
7
R X
T 2 O U T
Liquid crystal
R5
JP14
+5v
47K
2
P3_5
P3_6
P3_7
DP1
DP2
DP3
DP4
DP5
DP6
DP7
DP8
+5v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2x16 LCD
1924,
Hans
Berger,
German
psychiatrist,
performed
the
first
brain.
Table
summarizes
selected
landmark
discoveries
and
developments that have contributed shaping the EEG field throughout the
century.
The past two decades in particular have witnessed unparalleled progress in
our ability to image human brain function non-invasively. Different imaging
techniques are currently available to investigate brain function based on
hemodynamic
(positron
(functional
emission
magnetic
resonance
tomography,
PET),
imaging,
or
fMRI),
metabolic
electromagnetic
and
by mathematically
implementing
established laws
of
electrodynamics.
The main purpose of the present chapter is to review recent advances in the
EEG field. To understand these developments it will first be necessary to detail
the physiological basis of the EEG signal. Subsequently, important issues
associated with data acquisition, signal processing, and quantitative analyses
will be discussed (see Davidson, Jackson, & Larson, 2000; Pivik et al., 1993;
Gasser & Molinari, 1996; Nuwer et al., 1999; Thakor & Tong, 2004 for more
comprehensive reviews of these topics). The largest portion of the chapter will
be devoted to reviewing emerging source localization techniques that have been
shown to localize EEG activity without postulating a priori assumptions about the
number of underlying sources (Baillet et al., 2001; Michel et al., 2004). As we
will discuss, perhaps the greatest advancements in the EEG field in the last 5-10
years have been achieved in the development of these localization techniques,
in particular when used in concert with high-density EEG recording, realistic
head models, and other functional neuroimaging techniques. The picture
emerging in light of these achievements reveals that the spatial resolution of the
EEG may be substantially higher than previously thought, thus opening exciting
and new opportunities for investigating spatio-temporal dynamics of brain
Negative potentials at the surface can arise either due to (a) superficial EPSPs (i.e., excitation at apical
dendrites) or (b) deep IPSPs (i.e., inhibition of the soma). Conversely, positive potentials at the surface
can arise either due to (a) superficial IPSPs (i.e., inhibition at apical dendrites) or (b) deep EPSPs (i.e.,
excitation of the soma; Speckmann et al., 1993).
2
in
various
rhythmical
EEG activities
(Steriade,
1993).
In
animals,
synchronization;
e.g.,
Bressler
&
Kelso,
2001).
Thus,
and
gamma)
show
small
amplitude
due
to
high
degree
of
(assessed via PET) was found within the subgenual prefrontal cortex (Fig. 2).
Delta is also the predominant activity in infants during the first two years of life.
Ontologically, slow delta and theta activity diminish with increasing age,
whereas the faster alpha and beta bands increase almost linearly across the life
span (e.g., John et al., 1980). Collectively, these findings suggest that delta
activity is mostly an inhibitory rhythm.
in
amplitudes
are
not
uncommon
(Niedermeyer,
1993).
physiological
role
of
alpha
rhythm
remains
largely
unknown.
by
suggesting
that
alpha
synchronization
may
represent
an
of
positive
correlations
between
current
density
and
glucose
vigilance
(e.g.,
Mann
&
Paulsen,
2005;
Steriade,
1993).
Fell et al.,
2003; Mann et al., 2005; Schack, Vath, Petsche, Geissler, & Moller, 2002). In
general, these studies have shown that gamma bursts occur within periods of
the theta phase (Buzsaki, 1996 for review). Consistent with this notion, in a
recent
128-channel
source
localization
EEG
study
(Pizzagalli,
Peccoralo,
CHAPTER-8
8. CONCLUSION
. The signal generated by brain was received by the brain sensor and it will divide into packets
and the packet data transmitted to wireless medium (blue tooth).the wave measuring unit will
receive the brain wave raw data and it will convert into signal using MATLAB gui platform.
Then the instructions will be sending to the home section to operate the modules (bulb, fan). The
project operated with human brain assumption and the on off condition of home appliance is
based on changing the muscle movement with blinking