[sci.electronics] RS-232 for voice

knt@cbnews.ATT.COM (kirk.n.trost) (07/27/89)

Can fairly good sounding voice be sent digitized over
RS-232 ???


Thanks,

Kirk ...

tj@XN.LL.MIT.EDU (Thomas E. Jones) (07/27/89)

Can voice be transmitted over RS-232 lines?  The answer is yes, and it is,
but you must be more specific.  If you want to speak in a microphone, into
a computer, and have speech sent serially there are many ways to do it, but
it is fairly complex.  Data rates of understandable speech can vary from
9600 baud to 300 baud by using different methods.  I'll tell about these
below.  

If you don't want real-time vocoding, you just want to transmit data
representing speech, you can send the ASCII characters down the line, and
then have one of radio-shacks text-to-speech chips on the other computer,
to convert to speech.  Alternately, you can break the words you want to
send into phonetic pieces, and send codes for these pieces down the line,
at an even lower rate than the ASCII spellings of the words.  Toys such
as Speak & Spell store phonetic data like this in ROMS.  Parts cost is
around $20, if you already have the computers to transmit serial data.

If you want to run real-time vocoding, (speak into microphone, have computer
process it, and send it over serial lines.) there are many ways to do it.
You can use LPC vocoding, which is in common use in the military.  GTE
makes several miltary vocoders to do this at baud rates around 9600, or 4600
baud, but it sounds bad at these lower rates.  I think 9600 baud is about
the worse you can deal with.  You can code this LPC algorithm on a DSP
microprocessor for around $100 in parts.  Look in the library under
LPC coding of Speech.

MIT Lincoln Laboratory recently developed an algorithm called "sinusoidal
coding of speech."  It sounds much better at lower baud rates.  It makes
LPC coding sound terrible in comparison.  4800 bps data rates sound very
natural.  I can give you many references on this (call or email.) 

BBN recently developed a very low rate vocoding algorith, called the
"LPC Segment Vocoder"  that was recently (what time is it?) implemented
in real-time by MIT Lincoln Laboratory.  This codes speech at 300 bps,
and sounds fairly understandable.  It relies on tremendous lookup tables
of several megabytes, and requires lots of hardware.  I can also give
many references on this algorithm (call or email.)

DISCLAIMER:  I am no expert in this area, but worked for several people 
experts for a period of time.  All information is from the top of my head,
and could be wrong.  My employer doesn't necessary share in any of my
opinions.

			- Thomas E. Jones
			tj@xn.ll.mit.edu
			(617) 981-5093 (work)

-- 
tj@xn.ll.mit.edu or tj@ll-xn.arpa          (one of these should work)
Thomas E. Jones, home (617) 279-0767 work (617) 981-5093

fwb@demon.siemens.com (Frederic W. Brehm) (07/28/89)

In article <8616@cbnews.ATT.COM> knt@cbnews.ATT.COM (kirk.n.trost) writes:
>
>Can fairly good sounding voice be sent digitized over
>RS-232 ???

About 10 years ago, I visited KDD Laboratories in Tokyo.  They showed a
demo of sending compressed continuous speech over a 1200-baud RS-232
channel (actually CCITT V.2?).  The speech was understandable, but it was
difficult to identify the speaker.  Higher speeds would allow less
draconian compression methods, and better quality.  I think that
telephone-bandwidth speech at 64K bits/sec does not need to be compressed
(someone in your company should know).

But they were using a synchronous (not asynchronous :-) signalling method
over RS-232.  Are you asking if speech can be sent over a standard
asynchronous 8-bit data without parity + 1 start bit + 1 stop bit terminal
port?  What speed?  How good is "fairly good"?

Fred
--
Frederic W. Brehm	Siemens Corporate Research	Princeton, NJ
fwb@demon.siemens.com	-or-	princeton!siemens!demon!fwb

andrew@kean.mun.ca (07/30/89)

Hmm.  Lets assume that we can get away with somewhat poor quality.

Okay... Let's assume 8 data bits giving a 48 dB dynamic range ( 20 * log 
(2^number of bits) ).

Next assumtion: highest serial rate _routinely_ available for RS-232 
transmission: 19.2k baud = 1.92k bytes/sec.

Next assumtion: the setup will be along the lines of:

   Microphone ---> amp ---> ADC ---> computer ---> serial link =====
  ======== serial link ---> computer ---> DAC ---> amp ---> speaker.


Nyquist says then that the highest relevant frequency that can be sent with a 
sample rate of 1.92 kHz is 960 Hz.  Just possibly passable... but still pretty 
terrible for a human voice.  Probably still could be understood, though.

This could be fiddled with, of course... using 5 data bits (at 5N1 and 19.2 k 
baud), you should still be able to get a 30 dB dynamic range and a 1371 Hz 
bandwidth... figures which *in theory* should give quite reasonable results.
(transmission time/sample = 365 us).



Question: The theory seems to work... but does nature agree??? Anyone have 
experience with applications?


-Andrew.

Bitnet: andrew@kean.mun.ca

phil@ux1.cso.uiuc.edu (07/31/89)

Voice can be digitized quite well.  Then you can serialize the data and
send it over RS-232 if you want.

I dream for the day that RS-232 and V.35 connectors are banned and the
designers of them flogged and hung.

--Phil howard--  <phil@ux1.cso.uiuc.edu>

usenet@cps3xx.UUCP (Usenet file owner) (08/01/89)

Perhaps some sort of delta-modulation could be used to save
bandwidth.  For instance, how about collecting four samples
and sending them all in one byte using four bit-pairs for the
deltas?  If care was taken to buffer them and play back at a
regular rate, the resulting Nyquist rate would be 3840Hz,
pretty decent for speech.  The hardware need be nothing more
than an ADC, modulator, uart, uart, buffer, demodulator, DAC.
Of course, the delta modulation would be pretty coarse, and 
could probably stand to be devised by someone with knowledge
of this...

sampson@attctc.Dallas.TX.US (Steve Sampson) (08/01/89)

You can forget all about the amplitude!  Just pass the sign bit and it sounds
great.  (Pulse Width Modulation).  There's a program on compuserve that
basically digitizes via a comparator.  The record program then samples one
bit (comparator output) via interrupts and stores the resulting bits on disk.
The playback outputs to the speaker.  The quality is very acceptable.  This
program was also posted on the net, so check your ibm.pc area.  I tried the
circuit at 8 kHz and it was just a little less than telephone quality.

jimc@iscuva.ISCS.COM (Jim Cathey) (08/01/89)

In article <34700002@ux1.cso.uiuc.edu> phil@ux1.cso.uiuc.edu writes:
>I dream for the day that RS-232 and V.35 connectors are banned and the
>designers of them flogged and hung.

YES!  I'll even help tie them up for the flogging.

+----------------+
! II      CCCCCC !  Jim Cathey
! II  SSSSCC     !  ISC-Bunker Ramo
! II      CC     !  TAF-C8;  Spokane, WA  99220
! IISSSS  CC     !  UUCP: uunet!iscuva!jimc (jimc@iscuva.iscs.com)
! II      CCCCCC !  (509) 927-5757
+----------------+
			"With excitement like this, who is needing enemas?"

tjk@csd4.milw.wisc.edu (Thomas Krueger) (08/02/89)

In article <2587@iscuva.ISCS.COM> jimc@iscuva.ISCS.COM (Jim Cathey) writes:
>In article <34700002@ux1.cso.uiuc.edu> phil@ux1.cso.uiuc.edu writes:
>>I dream for the day that RS-232 and V.35 connectors are banned and the
>>designers of them flogged and hung.
>
>YES!  I'll even help tie them up for the flogging.

In defense of the DB25 connectors, wiring custom cables (with crimp-on pins,
natch) with your handy pin tool is pretty easy for weird applications like
when HP decides on some of their computers to use a different pin for DTR
than everyone else. I dunno why everyone had to switch to DB9 connectors,
but even that wouldn't have been so bad if the pinout of an IBM AT matched
the pinout of an Annex!

							- Tom
--
                 "A Veteran of the Psychic Wars"

Thomas Krueger, Univ WI Milwaukee College of Engineering Electronics Shop
tjk@csd4.milw.wisc.edu    [moderator, info-high-audio]    +1 414 229 5172

pcf@galadriel.bt.co.uk (Pete French) (08/02/89)

From article <8840@attctc.Dallas.TX.US>, by sampson@attctc.Dallas.TX.US (Steve Sampson):
> 
> You can forget all about the amplitude!  Just pass the sign bit and it sounds
> great.  (Pulse Width Modulation).  ...

UGH! I wouldnt say it sounds 'great'. You are performing the equivalent of
clipping the signal by turning up our amp to infinite volume.

It is, however, just aacceptable and so could be used. I remember constructing
a system to send audio digitally on a test bench and then unplugging the bits
one-by-one to see what the decrease in quality was. We were playing a Suzzanne
Vega tape through it and it was still recognisable, even listenable, at one bit.

I would hesitate to say that this is "Pulse width modulation" though - that is
something rather different.

-Pete French.

johne@hpvcfs1.HP.COM (John Eaton) (08/02/89)

<<<<<
>I dream for the day that RS-232 and V.35 connectors are banned and th
>designers of them flogged and hung.
----------
RS-232 was not designed,it congealed. The orginal designers used it as
a means connect a single Teletype to a single modem. They were not asked
to design a generic comm link between any two random and undefined pieces
of computer gear and they didn't. It was the industry that tried to 
stretch RS-232 to each new generation of equipment because nobody was
willing to scrap it and do it right. The electronics industry deserves
RS-232.

Don't complain about how lousy your screwdriver is if you are trying to
use it as a hammer.



John Eaton
!hpvcfs1!johne

jad@dayton.UUCP (J. Deters) (08/03/89)

In article <8840@attctc.Dallas.TX.US> sampson@attctc.Dallas.TX.US (Steve Sampson) writes:
[paragraph about serially digitizing audio data paraphrased]
>The quality is very acceptable.  I tried the circuit at 8 kHz and it
>was just a little less than telephone quality.

Only problem with this is the phone co. limits you to 3kHz bandwidth!

There ain't no free lunch.
-j
-- 
J. Deters - jad@dayton.DHDSC.MN.ORG
"I'll tell you what kind of guy I was.  If you ordered a boxcar full of
sons-of-bitches and opened the door and only found me inside, you could
consider the order filled."  -- Robert Mitchum

grnberg@mit-caf.MIT.EDU (David R. Greenberg) (08/03/89)

In article <6686@dayton.UUCP> J. Deters writes:

>In article <8840@attctc.Dallas.TX.US> Steve Sampson writes:

>[paragraph about serially digitizing audio data paraphrased]
>>The quality is very acceptable.  I tried the circuit at 8 kHz and it
>>was just a little less than telephone quality.
>
>Only problem with this is the phone co. limits you to 3kHz bandwidth!
>
>There ain't no free lunch.

Fortunately, quadrature amplitude modulation (QAM) has been used to transmit
at 9.6 Kbps over the (slightly greater than) 3 KHz telephone bandwidth.
In QAM, the pulses used to transmit data are shaped to fit the necessary
bandwidth, but may have one of a discrete number of possible amplitudes
and phases and therefore may contain several bits worth of information
apiece.

- David

pcf@galadriel.bt.co.uk (Pete French) (08/03/89)

From article <2587@iscuva.ISCS.COM>, by jimc@iscuva.ISCS.COM (Jim Cathey):
> In article <34700002@ux1.cso.uiuc.edu> phil@ux1.cso.uiuc.edu writes:
>>I dream for the day that RS-232 and V.35 connectors are banned and the
>>designers of them flogged and hung.
> 
> YES!  I'll even help tie them up for the flogging.
> 

NIce - so what alternative 25 pin connector would you suggest guys ?


-Pete French.

eli@spdcc.COM (Steve Elias) (08/05/89)

if you feel like going to the trouble of building a little bit
of extra (and inexpensive) hardware, you might slap a CVSD chip
on either end of your serial cable, with a few strategically placed
buffers.  CVSD speech at 19.2 kbits/sec doesn't sound half bad.  (maybe 1/3).

-- 
 ...... Steve Elias (eli@spdcc.com);(6178591389);(6178906844) {}
/* hi */

sampson@attctc.Dallas.TX.US (Steve Sampson) (08/06/89)

In article <4069@ursa-major.SPDCC.COM>, eli@spdcc.COM (Steve Elias) writes:
> if you feel like going to the trouble of building a little bit
> of extra (and inexpensive) hardware, you might slap a CVSD chip
> on either end of your serial cable, with a few strategically placed
> buffers.  CVSD speech at 19.2 kbits/sec doesn't sound half bad.  (maybe 1/3).
> 

I checked into CVSD chips.  This is really the way to go in digitized voice.
I didn't find it inexpensive though.  Do you have a source for 1-5 of these
at less than 30 bucks per gadget?  Harris has a real neat all digital CVSD
but I don't think they like less than 100 quantity.

rusty@cadnetix.COM (Rusty Carruth) (08/16/89)

In article <34700002@ux1.cso.uiuc.edu> phil@ux1.cso.uiuc.edu writes:
>
>...
>I dream for the day that RS-232 and V.35 connectors are banned and the
>designers of them flogged and hung.
>
>--Phil howard--  <phil@ux1.cso.uiuc.edu>

There was a time when I had created my own standard, which I (pride showing
here, sorry) called CDC-232 (my legal initials are CDC...) since I got so
doggone tired of the variations RS 232 allowed you.  Lets see, male DCE,
no, its a male DTE, no, its a female DCE.... NO! Wait! its a female DTE...
ARRGGHHH!!!  I finally built my own version of a breakout box.  What a pain
the RS 232 'standard' can be.  (Note to nit-pickers - sure, its really
called RS-232-C (I think), but (1) lots of 'rs232c' equipment does not
really abide by the standard, and (2) even if they did, there are 4
different ways you could wire a 'standard' RS-232-C connector.  So you
need 4^2 or 16 different cables to be able to hook any 2 'standard'
devices together.  YUCK!  I would not mind using a 25-pin connector
for just 8 signals (including ground) if I could make *ONE* cable
that would do the job in all cases.  Too bad they did not at least
standardize on one sex for the connector on equipment so we would
only need 4 cables (assuming that you wire up a cable for each 
possibility, an addmitedly poor assumption).  Then, of course you
have the equipment which is wired as a DTE, *except* that it has
the signals on pins 2 and 3 reversed from the standard :-(

Well, enough whining for now.  Sorry this is so late in the thread,
our usenet feed is temporarily down.....

---------- 
Rusty Carruth  UUCP:{uunet,boulder}!cadnetix!rusty  DOMAIN: rusty@cadnetix.com
Daisy/Cadnetix Corp. (303) 444-8075\  5775 Flatiron Pkwy. \ Boulder, Co 80301
Radio: N7IKQ    'home': P.O.B. 461 \  Lafayette, CO 80026