Google Answers Logo
View Question
 
Q: Transmitting Audio Over a Speakerphone Modem ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Transmitting Audio Over a Speakerphone Modem
Category: Computers > Hardware
Asked by: marvelsoft-ga
List Price: $20.00
Posted: 19 Aug 2003 12:04 PDT
Expires: 18 Sep 2003 12:04 PDT
Question ID: 246547
Good Afternoon,

I have a PcTel HSP56 Mr Data/Fax/Voice/Speakerphone modem. I want
to set up a program to answer the phone in my absence and present
the caller with a little menu.

So far, the program waits for an incomming ring, switches to
speakerphone mode with at#cls=8, and answers with ata. From here,
I can record a message because the modem is connected to my sound
card, so at#vls=6 sends the line input from the modem to my sound
card for recording.

The part where I'm stuck is: how should i play sound files over
the modem to the caller? I have tried at#vtx to put the modem in
audio transmit mode, and it says connect. From here, I can submit
audio data to the modem, but all I get on the phone is a loud
roar, sounds like I'm not submitting the data in the right format.
I tried Microsoft ADPCM 4-bit, 8000 Hurtz when I got the roar. I
also tried DVI-IMA ADPCM and that didn't work, either. But the
description of AT#VTX says "Voice transmit mode (ADPCM)". So my
question is really: What audio format is the PcTel HSP56 Mr
Data/Fax/Voice/SpeakerPhone modem looking for when in At#VTX, and
does the rest of my program look correct?

Thank you so much! - Craig.

Request for Question Clarification by aht-ga on 19 Aug 2003 17:42 PDT
Can you clarify something for me? Are you writing a custom program to
use with your modem? Have you already tried commercial software like
FaxTalk Messenger Pro, which supports a basic IVR capability using a
heirarchy of mailboxes?

Request for Question Clarification by aht-ga on 19 Aug 2003 17:49 PDT
Also, please send the modem a "AT+VSM=?" or "AT#VSM=?" command to see
what compression modes it supports, you may need to force a
compression type using "AT+VLM=<number>" in order to have it match the
type of sound data you are attempting to play.

Clarification of Question by marvelsoft-ga on 19 Aug 2003 18:52 PDT
Hi Aht,

Thanks so much for the quick response! Yep, I'm writing the program
myself. I want to do this myself - no 3rd party stuff. I'm a bit of a
weirdo that way - I want to know what's going on under the hood. Or
what isn't in this case <Grin>

My modem doesn't support at#vsm. I sent a at#vci? and it returned
PcTel;ADPCM;32. HTH - Craig.

PS: You can find a list of AT commands my modem does support here:




http://www.zoltrix.com/support_html/PUBLIC/MODEM/ATmanual/ATHSP336.HTM

Request for Question Clarification by aht-ga on 19 Aug 2003 20:40 PDT
Craig,

Here's a web document from Zoltrix related to programming a Voice
modem; while it is not specifically for your modem, I think you will
find the examples in section 8.6 informative. You may wish to try
using 4-bit, 7200 Hz as the ADPCM compression settings, this is
mentioned in one of the examples. Also, note that in order to support
voice compression, the DTE<>modem comm rate must be 38,400 bps (again,
mentioned in the examples).

http://www.zoltrix.com/PUBLIC/MODEM/ATmanual/ATVROCK.HTM

I'm posting this as a Clarification Request so that you can experiment
with the information at that programming guide to see if it helps. If
it does, and you are willing to accept this as your Answer, please let
me know.

Regards,

aht-ga

Clarification of Question by marvelsoft-ga on 19 Aug 2003 22:42 PDT
Hello again Aht,

Wow! That page you found is fantastic! It goes through everything
- My programming style is bang-on! That sure is good to know.

A super idea to change the baud. In voice command mode, I issued
at#bdr=16. 16 represents the number of times 2400 is multiplied.
So that makes 38400, and it didn't seem to make any difference.

I did try converting the test file I have to 4bit ADPCM, with a
sampling rate of 7200. I tried this in IMA ADPCM and Microsoft
ADPCM with no luck. Just more roaring.

As a point of interest, AT#VSR (the command to change the audio
codec sampling rate) only allows one parameter, 8000. When I issue
AT#VSR?, it says 8000.

Do you think I could be communicating with the modem wrong, that
is, setting up xon/xof wrong? Would that cause this roaring
problem? I'm not sure, but it's a possibility, I guess. I'm just
sending a baud rate of 38400. I'm not specifying any further
parameters.

You're doing a super job researching this. If you can think of
anything else to try I'll gladly do it!--Craig.

Request for Question Clarification by aht-ga on 20 Aug 2003 05:43 PDT
I'm going to ask some "simple" questions as a clarification request,
please indulge me... when you mention that you tried issuing an
AT#BDR=16 command to set the modem to a DTE rate of 38.4 kbps, is it
safe for me to assume that you also changed your serial comm rate (at
the PC end) to 38.4kbps immediately thereafter?

Also, how are you sending the decompressed data from the ADPCM codec
to the modem? And, have you tried to "play" the sound file through the
sound card (taking advantage of the speakerphone capability, assuming
that you have the sound card output tied into the modem's input),
instead of transmitting the decompressed ADPCM data to the modem for
it's DAC to reconstitute as sound?

I have come across some references online to a Rockwell ADPCM format
being proprietary, so my last "simple" question is, have you tried
recording a message through the modem (in VRX mode), and successfully
played it back through either the MS ADPCM codec, or the DVI-IMA ADPCM
codec? It may be that your codec isn't compatible. I refer you to an
example reference at:

http://www.blackice.com/Help/Tools/Voice%20OCX%20webhelp/WebHelp/Using_the_Codec_library_to_convert_to_and_from_modem_specific_formats.htm

There's a very good chance that this might be the problem.

Request for Question Clarification by aht-ga on 20 Aug 2003 05:46 PDT
Continuing with the possibility that it's your codec, check out this
shareware converter program:

http://www.fmjsoft.com/aaframe.html

It can handle conversion to/from the Rockwell ADPCM format.

Clarification of Question by marvelsoft-ga on 20 Aug 2003 10:30 PDT
Good morning Aht,

Wow, you're an amazing searcher. Good work!

Sadly, though, nothing seems to help. I did try on numerous
occasions to just send the files to the sound card hoping the
modem would transmit that data as it sends voice data to the sound
card when a caller speaks. The modem doesn't recognize anything I
send it.

I tried the Black Ice Software Fax Voice C++ program you pointed
me to. Well actually I tried playing the four different demo
formats they gave me. Infuriatingly enough, I just got more
roaring.

I am not submitting the audio through a codec. I simply read in
the file with a binary file read and print the data to the modem.
Is this not the correct way to do things?

You are being so patient, I really appreciate it. Good luck with
this one, and hopefully I've given you something to go on.--Craig.

Clarification of Question by marvelsoft-ga on 20 Aug 2003 10:34 PDT
Sorry, forgot to answer a couple of things.

Yes, after I issue at#bdr=16, I change my baud rate to 38400.

I can't record a file from the modem when in voice receive mode,
because the modem doesn't give me the audio data. It just sends it
off to the sound card. If only the modem would do either one or
the other, and not handle this differently for input and
output!--Craig.

Request for Question Clarification by aht-ga on 20 Aug 2003 22:02 PDT
Assuming that you have your modem driver installed properly (this
modem is a Winmodem, so its performance depends on the proper driver),
then you need to send a Conexant/Rockwell ADPCM formatted data stream
to it at the expected bit rate (4-bit, 7.2 kHz appears to be the
default, the 8 kHz includes overhead).

The HSP56's driver has an integrated codec for the Rockwell ADPCM
format. When in speakerphone mode, that codec automatically converts
the Rockwell ADPCM data stream from the modem's DAC into a Windows
standard PCM format which the sound card's driver is able to
understand and send to the sound card's DAC for conversion back into
sound.

In your case, you are trying to communicate directly to the modem, so
you need to send it preformatted data in the Rockwell ADPCM format.

Please try the FMJSoft program, Awave Audio, that I provided the link
to in a previous Clarification Request (up above). Use it to convert a
WAV file (recorded using your sound card and Windows Sound Recorder)
to a 4-bit 7.2 kHz Rockwell ADPCM file. Then, try sending that file to
the modem.

Silly question, but are you getting a CONNECT response from the modem
when you enter AT#VTX mode?

Clarification of Question by marvelsoft-ga on 22 Aug 2003 12:29 PDT
Good Morning, Aht,

Thanks to your step-by-step directions, I finally managed to get that
darn modem working.  So please go ahead and formally answer the
question - even though you've already done so!

Thanks again for everything, and have a wonderful week-end! - Craig.
Answer  
Subject: Re: Transmitting Audio Over a Speakerphone Modem
Answered By: aht-ga on 22 Aug 2003 14:59 PDT
Rated:5 out of 5 stars
 
marvelsoft-ga:

Thank you for you Question, and your patience as we worked through the
possible causes of the problem together.

Summary:
--------

To summarize the Answer to your Question, we determined that the cause
of the problem was an incompatibility of the sound file format that
you wished to transmit, and the encoding required by the modem driver.
The solution involves using a utility such as FMJSoft's Awave Audio to
ensure that the sound file follows the necessary Rockwell ADPCM file
format. We were also able to confirm that your program conforms to the
manufacturer's recommendations for managing voice data to and from the
modem.

Details and Links:
------------------

Your modem, a Zoltrix PCtel HSP56 Data/Fax/Voice/Speakerphone
"Winmodem", utilizes a Conexant-Rockwell chipset. This chipset
supports the transfer of voice data to the PC, utilizing the onboard
digital-analog converter (DAC) and a software implementation of the
Rockwell ADPCM codec contained within the modem driver.

Examples of how to control this modem for voice data are available at:

http://www.zoltrix.com/PUBLIC/MODEM/ATmanual/ATVROCK.HTM 

In particular, section 8.6 deals with transmitting a sound file to the
modem for playback over the telephone line.

As the Rockwell ADPCM compression format is considered proprietary, it
is necessary to use a licensed third-party application to create or
convert sound files to work with this modem. One such utility is
FMJSoft's Awave Audio, which is available in a trial version at:

http://www.fmjsoft.com/aaframe.html 

The default settings for the Rockwell compression format are 4-bit,
7.2 kHz.

There are also third-party programming libraries available such as
Black Ice's 'Voice C++/ActiveX Software Development Toolkit', which
provide converters to and from the Rockwell ADPCM format for use
within a software application:

http://www.blackice.com/voicecpp.htm

For your purposes, this toolkit is not necessary unless you wish to
incorporate additional functionality such as real-time recording or
text-to-speech capabilities.

Search Strategy:
----------------

"Rockwell ADPCM" format converter
://www.google.com/search?q="Rockwell+ADPCM"+format+converter

Zoltrix ADPCM program
://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=Zoltrix+ADPCM+program


----------------

I am glad that I was able to help you with this Question, and wish you
all the best as you continue to evolve your program to serve your
needs.

Regards,

aht-ga
marvelsoft-ga rated this answer:5 out of 5 stars
An Incredibally thorough answer. It's obvious that a large amount of
time was spent gathering the wealth of information that was provided,
and I really, truly appreciate it. Aht sure would make a first-rate
employee for any technology company! - Sincerely, Craig Faris,
MarvelSoft Corporation.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy