A Minor Project Report On Skyblue Voice Chat

hundredcarriageΛογισμικό & κατασκευή λογ/κού

3 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

84 εμφανίσεις








TRIBHUVAN UNIVERSITY

ADVANCED COLLEGE OF ENGINEERING AND MANAGEMENT

DEPARTMENT OF ELECTRONICS AND COMPUTER

KUPONDOLE, LALITPUR


A

Minor Project Report

On

Skyblue

Voice Cha
t




Submitted to:


Department of Electronics and Computer Engineering

Advanced College of Engineering & Management




Submitted By:

Prakash Sapkota

Rajendra Baral


Rajendra Poudel

Suman Adhikari

2008/BCT/524 2008/BCT/528 2008/BCT/529

2008/BCT/544











Kathmandu, Nepal


November 13



2011



Skyblue

Voice Chat



November, 13, 2011


ii



Acknowledgment





We are thankful to all those who have helped us directly or indirectly with this
project. Our
special thanks go to Er. Bad
ri Adhikari
for his guidelines for this
project. We thank
him for organizing this course and acknowledge his effort that encouraged us to take this
challenging project.



We would also like to offer our gratitude to our teachers

and entire senior

whose
lectures and ideas were the basis for our p
roject research .We would like to thank our friends,
without their ideas and support this project wouldn't have been successful. We finally would like
to thank our teachers Er. Surender Dhakal and Er.
Syan

Kirat


Rai who gave their precious idea
for our p
roject.





Skyblue

Voice Chat



November, 13, 2011


iii



Abstract




The main aim of this project is to provide communication between several clients
from one place to another place through LAN connection. The problem faced with previous
system was not having a voice chat function as good
as we needed.



Using this voice chat, the conversation between users will become easier. The
main module of this system will be desktop interface with login page, main, voice
chat

and
server modules. For this project the researches will be carried out to
gather the information about
the proposed system by using the current available systems.

The software requirement includes Microsoft Windows as the operating system for server and
independent platform for client, Apache as the web server, MySQL as the dat
abase and open by
a java application
-

Skyblue

Voice Chat (SVC).Others hardware requirement will be headphone.
The main job will be to provide as much as

higher quality sound transmitting and receiving.




Skyblue

Voice Chat



November, 13, 2011


iv


Contents

Acknowledgment

................................
................................
................................
.............................
ii

Abstract

................................
................................
................................
................................
...........

iii

Contents

................................
................................
................................
................................
..........

iv

1.

Introduction

................................
................................
................................
.........................

-

1
-

1.1 Description of Project

................................
................................
................................
........

-

1
-

1.2 Domain Research

................................
................................
................................
..............

-

1
-

1.3 Objectives

................................
................................
................................
..........................

-

2
-

1.4 Scope

................................
................................
................................
................................
.

-

2
-

2. Literature

Review

................................
................................
................................
....................

-

3
-

2.1
Local Area Network

................................
................................
................................
...........

-

3
-

2.2 Local Area Network Voice Chats

................................
................................
.......................

-

3
-

2.3 Ethernet Physical Layer

................................
................................
................................
.....

-

4
-

2.4 Java Sound API
................................
................................
................................
...................

-

4
-

2.5 Threads

................................
................................
................................
..............................

-

5
-

2.6 Socket Programming

................................
................................
................................
.........

-

5
-

3. Project Schedule

................................
................................
................................
.....................

-

6
-

4. Pro
ject plan

................................
................................
................................
.............................

-

7
-

4.1 Project Milestones

................................
................................
................................
............

-

7
-

4.2 Cost Estimation

................................
................................
................................
.................

-

7
-

4.3 Co
nfiguration and Management

................................
................................
.......................

-

7
-

5. Feasibility

................................
................................
................................
................................

-

8
-

5.1 Economic Feasibility:

................................
................................
................................
.........

-

8
-

5.2 Technical Feasibility:

................................
................................
................................
.........

-

8
-






Skyblue

Voice Chat



November, 13, 2011


v


6. System Architecture

................................
................................
................................
................

-

9
-

6.1 Design

................................
................................
................................
................................

-

9
-

6.2 System operation

................................
................................
................................
............

-

10
-

6.2.
1 Clientside

................................
................................
................................
......................

-

10
-

6.2.2 Serverside

................................
................................
................................
.....................

-

11
-

6.2.3 Java Sound API

................................
................................
................................
.............

-

11
-

7. S
ystem Testing

................................
................................
................................
......................

-

13
-

8. Conclusion

................................
................................
................................
.............................

-

14
-

8.1 Result

................................
................................
................................
...............................

-

14
-

8.2 Problem Faced

................................
................................
................................
.................

-

14
-

8.3 Co
nclusion

................................
................................
................................
.......................

-

14
-

9. Future Enhancement

................................
................................
................................
............

-

15
-

10. References

................................
................................
................................
............................

-
1
7
-










1.

Introduction


1.1 Description of P
roject





This project will be carried out to provide an easy communication between two
clients within Local Area Network (LAN). Using
computer with head set, users will be able to
send audio messages to individuals across a LAN network environment. There are others
alternative device for communication such as headphone but cost a lot of money whereas this
LAN SVC System will reduce it. T
he system will integrate various components including
headsets devices or speakers and microphone, computers, Local Area Network and a Voice Chat
server.


A LAN SVC will be a live connection between people in separate locations for the purpose of
communica
tion, usually involving audio. It will also provide transmission of high
-
quality audio
between multiple locations and it will utilize high bandwidth of network
.

It will cause an
additional in network traffic. To overcome that problem this system will using

the suitable codec.


1.2 Domain Research





Actually
, online

voice chat is
small

software having size only few MB. Online
voice chat is mainly used for communication between different users through LAN connection.
The main
challenge that

we have
faced is

coding phase
for passing

username
between client

and
server that multiple users are connected for voice chat. The next
challenge which

we have
felt

is
passing voice

between different clients. But we were
succeeding

in passing message that
multiple users were
linked. We

have also
succeeded

in passing voice between different clients.
The last task of our project is
to give to excellent quality
of our voice message. This wi
ll be
finished with the help
of
www.sf.net
web link.




Skyblue

Voice Chat



November, 13, 2011


-

2
-






1.3

Objectives



The main goal
s

of our projects are:



To develop a general purpose desktop
-
based chat application for a private
network that supports text chat as well as voice chat.



T
o
communicate
and make knowledge sharing
between two clients easily.



To provide user to used easily our voice chat
software
.





T
he communication on Local Area N
etwork

(LAN)

makes
user easy to
c
ommunicate.



To provide the cheaper communication on L
AN as alternative besides using
t
elephone which take charge.



1.4

Scope





Voice Chat for Local Area Network (LAN) connection in users.



Voice
Chat had been

developed using NetBeans IDE 7.0

software to code
the Java language with MySQL database.



This
projec
t has

involve
d

one
server connected with multiple client

but

only
two clients chat at a time.




Modules to develop ar
e Login, Main,

Chat

and Server modules

to the
member to chat
.



Skyblue

Voice Chat



November, 13, 2011


-

3
-



2.
Literature

Review

2.1

Local

Area N
etwork




A

Local Area N
etwork

(LAN) is a network that connects computers and devices
in a limited geographical area such as home, school, computer laboratory, office building, or
closely positioned group of buildings. Each computer or device on the network is a node. Current
wired LANs

are most likely to be based on

Ethernet technology
.


The defining characteristics of LANs, in contrast to WANs (Wide Area Networks), include their
higher data transfer rates, smaller geographic range, and no need for leased telecommunication
lines.




2.2
Local Area Network Voice C
hats



Voice over Internet Protocol

(Voice over IP,

VoIP) is a family of technologies,
methodologies,

communication

protocols
,
and transmission techniques for the delivery of

voice
communications

and

multimedia

sessions o
ver

Internet Protocol

(IP) networks, such as
the

Internet
. Other terms frequently encountered and ofte
n used synonymously with VoIP are

IP
telephony,

Internet telephony,

Voice over Broad

B
and

(VoBB),

broadband telephony,
and

broadband phone.



Skyblue

Voice Chat



November, 13, 2011


-

4
-





2.3
Ethernet Physical L
ayer


The

Ethernet physical layer

is the

physical layer

component of the

Ethernet

family

of

computer network

standards. The Ethernet physical layer evolved over a considerable time
span and encompasses quite a few physical media interfaces and several

magnitudes

of speed.
The speed ranges from 1

Mbit/s

to 100

Gbit/s

while the physical
medium can range from
bulky

coaxial
cable to

twisted pair

to

optical fiber
.
In general, network

protocol stack

software
will work similarly on all physical layers.




2.4
Java
Sound API


The Java Sound API is a low
-
level API for effecting and contr
olling the input and
output of sound media, including both audio and Musical Instrument Digital Interface (MIDI)
data. The Java Sound API provides explicit control over the capabilities normally required for
sound input and output, in a framework that prom
otes extensibility and flexibility.

The Java
Sound API fulfills the needs of a wide range of application developers. Potential application
areas include:



Communication frameworks, such as conferencing and telephone



End
-
user content delivery systems, such
as media players and music using streamed
content



Interactive application programs, such as games and Web sites that use dynamic
content,
content

creation and editing Tools, toolkits, and utilities.


Skyblue

Voice Chat



November, 13, 2011


-

5
-





2.5
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.

F
or example, a program is not capable of drawing pictures while reading keystrokes. The
program must give its f
ull 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
section
s of a program at the same time which is allowed by t
hreads
.

Multithreaded a
pplications
deliver their potent power by running many threads concurrently within a single program.



2.6

Socket P
rogramming


Normally, a server runs on a specific computer and has a socket that is bound to a
specific port number. The server just waits, listening to the socket for a client to make a
connection
request.



On

the client
-
side: The client knows the hostname of th
e machine on which the server
is running and the port number on which the server is listening. To make a connection request,
the client tries to rendezvous with the server on the server's machine and port. The client also
needs to identify itself to the se
rver so it binds to a local port number that it will use during this
connection. This is usually assigned by the system.



A socket is one endpoint of a two
-
way communication link between two programs
running on the network. A socket is bound to a port
number so that the TCP layer can identify
the application that data is destined to be sent.



Skyblue

Voice Chat



November, 13, 2011


-

6
-


3. Project

S
chedule


We have planned to start the working from the last week of June and hope so far to
end at most before the deadline. To complete our project efficiently and before the deadline, we
have to divide our workload properly. Hence, we have concluded that we would

give more time
for testing and debugging our source code to make software with fewer bugs. Proper time
division would be a must for software
to be developed in time. Since h
ere we have

S.N

Objective Name

Objective Description

Time

1

Study, Research and

Analysis

Gathering information on the topic

June5
-
15

2

Proposal submission
and Defense

Documenting all information's obtained

June 16
-
24

3

Designing of the
layout

D
esign
ed the

log
in page of the voice chat &
design
ed

the graphical part
.

June 25
-
July
10

4

Programming

Code written should fulfill the
requirements

July 11
-

31

5

Testing ,Modification
and Documentation

Project had tested, code were modified to
obtained
desire output.

October 20
-
November 5



june 5
-
15

june 16
-
24

june 25
-
july10

july 11
-
31

october 20
-
november 5

weight age

Study, Research and Analysis
Proposal submission and
Defense
Designing of the layout
Programming
Testing, Modification and
Documentation
Skyblue

Voice Chat



November, 13, 2011


-

7
-



4.
Project plan

4.
1

Project Milestones


Activities

Work

Activity1

Designing interface for login completed

Activity 2

Socket connection completed

Activity 3

Connection between clients and server completed

Activity 4

Passing voice completed


4.2 Cost Estimation

4.3

Configuration and Management



The proposal of our minor project is currently located
a
t:
http://sourceforge.net/projects/acembct08/files/Project%20Reports/

S.N


Description

Total cost(Rs)

1

Electricity consume for 4 computer =500unit

4,500

2

Software (
NetBeans

IDE 7.0)

20,000

3

Hardware e
quipment’s(4
-
摥獫瑯s⁣潭灵oe爩,e
ead獥瑳

ㄬ㈲ⰰ〰

4

pa污ly

㠰ⰰ〰

5

䵩jce汬a湥潵猠⁩湣汵摩湧nt
-
c桡rge

㈬〰2

6

呯瑡氠

㈬㈸ⰵ〰

Skyblue

Voice Chat



November, 13, 2011


-

8
-



5.
Feasibility


5.1

Economic Feasibility
:


As this
project didn’t require many human resources, tools such as hardware and
software required to develop this software will be not of high cost thus it seems feasible and can
be implemented in a developing country like Nepal.



In our county we have se
en that the communication system has been developed
rapidly although telephone system seems easy but it takes charge for calling. Chatting can take
best of this system to provide the fastest, easiest & economical services to their user
s

and
enhance their business and communication. Besides this, this system provides the secured means
of providing and getting the services of chatting.


5.2

Technical Feasibility
:


Technically, this system that we develop is very easier to
use. T
here is no any
restriction and user
s

can easily run this program with few knowledge of the system. User
s

can
directly run t
he application without help of
other people.



Skyblue

Voice Chat



November, 13, 2011


-

9
-




6
.
System Architecture

6.1 D
esign













Client 1






client 2











server


Fig

6.1
:

System Architecture of
Skyblue

Voice Chat



Skyblue

Voice Chat



November, 13, 2011


-

10
-



6.2 System

o
peration





6.2.1 Client
sid
e

1)

Open

its socket
.

2)

Send user name.

3)

Receive unique name of this client.

4)

Start three threads:

a.

readerThread ()
:
-

-
reads the
message (
status of client) receive from
server.

b.

w
riterThread

()
:
-

-
sends the
message to the server.

c.

listenerThread ()
:
-

-
listen for socket of other clients want to talk with this.

5)

Contain another
thread senderThread

(
) starts when this client click the talk button if that
client wish to talk wit
h other.

6)

Beside

this,

Client side has
initcomponent (
) whi
ch is for user

interface
.

7)

Client can do talk, stop talk and sign out

and performs that operation.




Skyblue

Voice Chat



November, 13, 2011


-

11
-




6.2.2

S
erverside


1)

Serverside accepts the multiple

clients socket and thread for that client starts which is
readerThread (
) and
writerThread (
) work as same as in
clientSide
.

2)

Make the unique name of all clients and send each name to each client.

3)

Send existing user to all clients.

4)

Response to the client
request like talk, stop talk and sign out.

5)

Holds

the sockets of the two clients that are talk.

6)

If any client request to talk with clients that are already talk, sends busy message to that
client.



6.2.3
J
ava Sound API


For transferring and receiving voice between two
clients, we

use Java Sound API.

We have following java

classes:

1. Sender ()

a) Opens the new socket of this client.

b) Gets audio format and available mixer in java.

c) Creates two data line: targetDataLine

as receiving audio input from



speaker and SourceDataLine as output to the speaker.

d) captureThread () capture audio from targetDataLine and send audio to the



talking client.

e) playThread () takes the audio from sourceDataLine from other cli
ent and



play it.




Skyblue

Voice Chat



November, 13, 2011


-

12
-


2. Listener ()


a) Listen the new socket of this client.


b) Gets audio format and available mixer in java.


c) Creates two data line: targetDataLine as receiving audio input from


speaker and SourceDataLine as output to the speaker.


d)
captureThread

() capture audio from targetDataLine and send audio to the


talking client.


e) playThread () takes the audio from sourceDataLine from other client and


play it.




Skyblue

Voice Chat



November, 13, 2011


-

13
-



7.
S
ystem T
esting



For system testing we had collected three
laptop computers

together.

We had

needed several

computers

with

headphones
and a

connection cable
of different

computer called
Ethernet
cable (
RJ 45). For

system to be tested first of all we

had connect
ed

the entire

computer
by making one server computer and
remaining clients
. We had set ip
-
address of our computer
from network and shearing center.


Secondly we had

run the server side coded progra
m in
NetBeans

IDE 7.0.
After
complete compile

and running server side we had

run our client side program in our computer

then we had enter their name
. After
this we

had

seen

a rectangular
box showing name of all
clients connected to the server.

A
s our

wish, we had

talk by clicking name shown in the
rectangular box
. We

had

stopped

talking whenever we nee
ded.







Skyblue

Voice Chat



November, 13, 2011


-

14
-




8.

Conclusion


8
.1 R
esult


Finally we had completed our aim that we had
succeeded

in passing user name
from client via s
erver to next client.
We had also
succeeded

for sending the voice message from
one client to next one client. The result that we had expected would not obtained in sequence
order but we had able to transmit that the c
lear voice that we had expected in shor
ter time.


8.
2
Problem F
aced


We had faced different problem in different time period of our projec
t. The main
problem was that how

the
project could

be designed in sequence order. Could we succeed to
design our project
as different as possible as

that of existing one. After
completed

of our
framework of the project, we had entered in coding phage of our project from designing part. We
had also
succeed
ed

in drawing the
architecture

of the project. Firstly we had faced the problem in
knowledge of socket programming. Different web sites had been visited by our team member
and succeed in coding
the socket programming within ten

days.


The next probl
em had been detected was coding for thread.
Some small error was
occurred which causes lost of time and energy of thought. We had also pr
oblem to find
applicable sound API

that we had nee
ded. The connection of sound API

with our project code
was also a pro
blem for us.


Lastly we had succeed in maintain
the entire

problem towards our project
of Local

A
rea
N
etwork (
LAN) voice chat.

8.
3
C
onclusion




We had completed our
project successfully. We had
completed different

phages of
our project.

The
Designing interface for login

completed. The connection between clients and
server completed. Passing voice message completed. We had also completed the quality of sound
like
mono,

stereo, etc.

W
e were not able to complete our project completely as we

needed like
passin
g more huge quality of sound.

We had added the features like user can talk more time as
users
needed. User
s

could stop

talking any time. User would not
speak loudly to transmit user’s

voice etc. Thus we can conclude that any project is not a simpler on it but if we start seriously,
we can maintain it. Time is more important in any project but if we manage our time as possible
as lossless we will obtained our desired destination at last
.

Skyblue

Voice Chat



November, 13, 2011


-

15
-


9.

Future Enhancement




Passing text message also.



Long time recording the voice.



Voice chat without any distortion.



Maximum no of client’s connection.



Stereo s
ound receiving at the receiver
Skyblue

Voice Chat



November, 13, 2011


1



10.

References






http://en.wikipedia.org/wiki/




http://www.javagaming.org



Java Forum [ http://forum.java.sun.com ]



Official Java Swing tutorials
-

http://www.theswingconnection.com



http:/
/www.sourceforge.com



http://www.uioe.sf.net



http://www.1000project.com




http://javasolution.blogspot.com/2007/04/voice
-
chat
-
using
-
java.html




http://learnjava
-
code.blogspot.com/2011/05/voice
-
chat
-
program
-
in
-

java.html




http://javasolution.blogspot.com/2007/04/voice
-
chat
-

using

-
java.html




http://learnjava
-
code.blogspot.com/2011/05/voice
-
chat
-
program
-
in
-


java.html



http://www.planet
-
source
-
code.
com/vb/scripts/ShowCode.asp?tx

coded
=4789&lngWId=2




http://zerioh.tripod.com/resso
urces/sockets.html