Click here to Skip to main content
13,863,289 members
Click here to Skip to main content
Add your own
alternative version

Stats

187.3K views
8.4K downloads
101 bookmarked
Posted 13 Jun 2000
Licenced

A Simple Prototype for Demonstration of Voice Communication via Network/Internet

, 14 Jun 2000
Rate this:
Please Sign up or sign in to vote.
Voice communication

Introduction

This is the simplest prototype to demonstrate how to realize a basic Voice Communication via Internet/Network on PC platform. The technique in this demo can be applied to develop the PC internet voice communication software, such as Internet Phone.

To save development time, I borrowed the idea of Client/Server design in Microsoft MSDN sample "GlabolChat".

This sample has been tested in an intranet consisted of NT4.0 Server/Workstation and a LAN consisted of Win2000 Professional. The CPUs in the testing PC are at least Intel P2 266 or faster, and SoundCard, Mic, Speaker are a must.

In the tests, it can work smoothly in bi-directions voice talk with the an acceptable sound quality.

The Basic System Design

This sample contains two modules, Talkserver and Talkclient.

The basic system diagram is like:

System diagram

Server Module

Server module has two type sockets, server sockets and client sockets. One server socket supports a certain network protocol and listens to the incoming connection with such protocol. When a client connection request comes, the server socket creates a client socket to build the link with the client. The client socket works to receive the messages from its client, transit the message to peer client socket, then the peer client socket sends the messages to the target client. The client socket also gets the messages from the peer socket and send these messages to its client.

Client Module

The user can use the client modules to communicate in voice with each other. The socket in the client is implemented as sending/receiving messages to/from the server.

The method to capture and transit sound data in client module is building and running a wave input device, when this wave input device records enough to size of the data buffer in its wave header structure, it notifies client instance. When the client receives the wave input device message, client retrieves the sound data in the wave input device buffer, then encodes the sound data into the voice communication message and sends to the peer (or target) client.

To play a voice message is similar. The client has a wave out device. After the client receives voice message from other client, it decodes the sound data from the message, put the sound data to the wave output device and drives it to play the sound.

Change Sound Quality

By changing the wave device buffer and wave format type defined in vtDef.h, you can change the sound quality in some kind of levels.

History

  • 14th June, 2000: Date posted

License

This article has no explicit license attached to it, but may contain usage terms in the article text or the download files themselves. If in doubt, please contact the author via the discussion board below.

A list of licenses authors might use can be found here.

Share

About the Author

No Biography provided

You may also be interested in...

Pro

Comments and Discussions

 
General[Message Deleted] Pin
it.ragester2-Apr-09 22:50
memberit.ragester2-Apr-09 22:50 
Generalwnat to setup an vc++ project Pin
y_naga_malleswararao10-Apr-06 2:51
membery_naga_malleswararao10-Apr-06 2:51 
GeneralGood Job ! Pin
carlmalden14-Mar-06 16:22
membercarlmalden14-Mar-06 16:22 
GeneralClient crashes when voice talk is clicked Pin
doctorrie1-Oct-05 21:06
memberdoctorrie1-Oct-05 21:06 
Generalencryption Pin
valroft12-May-05 11:11
membervalroft12-May-05 11:11 
GeneralRe: encryption Pin
suendisra15-Apr-12 18:56
membersuendisra15-Apr-12 18:56 
QuestionHow to configure the protocol and talk server Pin
wenfoo16-May-04 18:53
memberwenfoo16-May-04 18:53 
Generalbetter code then this Pin
dharani26-Sep-03 2:58
memberdharani26-Sep-03 2:58 
QuestionHow support a microphone in C# Pin
CNWORM22-Aug-03 22:00
memberCNWORM22-Aug-03 22:00 
AnswerRe: How support a microphone in C# Pin
Anonymous5-Oct-05 19:23
memberAnonymous5-Oct-05 19:23 
Generalerror in preparing buffer when reseting Pin
Maria Calvo1-Jul-03 7:20
sussMaria Calvo1-Jul-03 7:20 
Generalrepeated strange noises with talk option activated Pin
Marcos Martinez1-Jul-03 1:39
memberMarcos Martinez1-Jul-03 1:39 
Generalfirst Pin
mannu12345678920-Apr-03 8:03
membermannu12345678920-Apr-03 8:03 
GeneralRe: Making it for WinCE Pin
dharani26-Sep-03 3:00
memberdharani26-Sep-03 3:00 
Questionhow can i modify it to work over Internet Pin
keen22-Dec-02 21:01
memberkeen22-Dec-02 21:01 
AnswerRe: how can i modify it to work over Internet Pin
Zhaohui Xing (Joey)24-Dec-02 7:18
memberZhaohui Xing (Joey)24-Dec-02 7:18 
GeneralRe: how can i modify it to work over Internet Pin
Member 143262512-Mar-05 7:32
memberMember 143262512-Mar-05 7:32 
GeneralEcho problem Pin
Imran Farooqui5-Nov-02 22:46
memberImran Farooqui5-Nov-02 22:46 
GeneralRe: Echo problem Pin
Anonymous7-Jan-03 18:26
memberAnonymous7-Jan-03 18:26 
Generalcool! Pin
Anonymous12-Aug-02 12:34
memberAnonymous12-Aug-02 12:34 
GeneralThis is not working in LAN Pin
venkaiah4-Aug-02 23:14
membervenkaiah4-Aug-02 23:14 
GeneralRe: This is not working in LAN Pin
AlejandroDG13-Mar-05 4:34
memberAlejandroDG13-Mar-05 4:34 
GeneralThis is not working in LAN Pin
Anonymous4-Aug-02 23:13
memberAnonymous4-Aug-02 23:13 
GeneralVery nice but a lot of echos Pin
24-Apr-02 22:12
suss24-Apr-02 22:12 
GeneralVoice communication in windows ce platform Pin
25-Feb-02 19:46
suss25-Feb-02 19:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web03 | 2.8.190214.1 | Last Updated 15 Jun 2000
Article Copyright 2000 by Zhaohui Xing (Joey)
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid