Recording into the ISD VM1110A Voice Module with a Basic Stamp 2

Recording into the ISD VM1110A Voice Module with a Basic Stamp 2

Home

Here is a procedure for recording into the VM1110A. In some ways it is easier than using the ISD 1000A voice chip, in that it generates an end of message bit itself, takes up less space and is easier to control. You do have to make do with 8 one second slices (as seen by the pins).

My setup was with two computers, one a laptop running the STAMP2 software, and a windows box with a sound card. You'll also need a cheap microphone. All parts except the BASIC Stamp are available at Radio Shack (Cat. No. 276-1324), which is important. (See my "Why can't you just buy components anymore?" page for further thoughts on this subject. The BASIC Stamp 2 you can get from Digikey or Jameco. (Deducing the url's for Digikey and Jameco is left as an exercise for the student).

IPORTANT! The schematic included with the Radio Shack part is wrong! go to ISD (http://www.isd.com/doclib/chipcord.html) and get the right docs.

In case you can't get there from here:
WRONG
COMPONENT SIDE
10 9 8 7 6 5 4 3 2 1
20 19 18 17 16 15 14 13 12 11
RIGHT
COMPONENT SIDE
3 27 26 25 24 23 22 21 20 19
4 5 6 7 8 9 10 11 12 13
That's the pins, haven't bothered to check the edge connector.

RECORDING: VOICE INTO THE WINDOWS BOX


While you can attach a cheap electret microphone directly to the module, quality suffers and usage is a pain. A far easier method is to record the audio into the computer, massage it, and play it out into the voice module.

A good shareware sound editor is Goldwave:
"(v3.03) GoldWave - Audio editor for Windows GoldWave is a digital audio editor for Windows 3.1. It has real-time oscilloscopes, intelligent editing, and numerous effects such as echo, flange, distortion, mechanize, and reverse. The intuitive user interface makes GoldWave easy to learn and use. Author: Chris Craig (chris3@cs.mun.ca) http://web.cs.mun.ca/~chris3/goldwave/"

I had to record the numbers "zero", "one" on up through "nine" into the voice module. Plugging the mike into the sound cards microphone input, its easy to record it as a .wav file. It's much easier to manipulate as a single long .wav than ten little ones, and record (or insert later) about five seconds of silence at the beginning.

Gold wave will show a spectrogram display showing your wave as a series of bumps on a thin green line. Resist the temptation to record it again while talking lowder, and instead select "Effects","Volume","Maximise". It will set the volume to a reasonable level and expand the scale so it is easy to see the individual words and the gaps between them

Selecting the portion to play back is counter intuitive. The bright blue section is the only one played. The Left sound button marks the beginning of the sound sample, and the Right mouse button marks the end. It will become obvious with a little practice.

RECORDING: VOICE FROM THE WINDOWS BOX INTO THE VOICE MODULE


The Record Schematic in ASCII format:

WINDOWS COMPUTER       ISD1000A        STAMP 2         DOS COMPUTER 
___                    __________      _______           ________
   | SPKR OUT         |          |    |       |         |        |
   +------------------+     A0 20+----+P0     +-SERIAL--+        |
   |            Pin 8 |     A1 21+----+P1     |  CABLE  |________|
   |        ANALOG IN |     A2 22+----+P2     | 
   |                  |     A3 23+----+P3     |
   |                  |     A4 24+----+P4     |
   |                  |     A5 25+----+P5     |
   |                  |     A6 26+----+P6     |
   |                  |     A7 27+----+P7     |
   |                  |          |----|       |
   |                  |  BATT+ 13+----+VDD    |                  MOMENTARY
   |     SPEAKER      |   REC  12+----+P15    |     | + VDD      ACTION
   |         |\       | PLAYE  10+----+P14    |     |            PUSH BUTTON
   |         | \      |          |    |       |     > 10 K OHM     |  SWITCH
   |         | +------+4 SPKR+   |    |       |     < RESISTOR   --+--
   |         | +------+5 SPKR-   |    |       |     >            |   |
   |         | /      |          |    |     P8+-----+------------+   +-----+
   |         |/       |          |    |       |                            |
   |                  |          |    |       |                            | 
   |                  |   BATT- 3+-+--+VSS    |                            |
   |                  |__________| |  |_______|                            |
   | COAX GROUND                   |                                       |
   +-------------------------------+---------------------------------------+

In the application I was designing for, A0, A1, A6 and A7 could all be tied low, meaning you can get buy with the eight pins of a BS1.

RECORDING: THE PROCEDURE


The voice chips memory is partitioned as follows:
ADDRESS SECONDS
AAAA AAAA
7654 3210
LL00 0000 0 seconds
LL00 0001 .125 second
LL00 1000 beginning of first second
LL01 0000 beginning of second second on up through:
...
LL11 1000 beginning of seventh second.
LL11 1111 beginning of 7.875, last memory location
L = Tied low, bits A6 and A7 low determing that you are addressing, and control other functions (continuous loop etc.) that I wasn't using for this ap.

I wanted simple binary count to the addresses, makes the math a little easier, but since I needed a all ten digits all couple of them had to be a half second long instead of a second. Here's the partition I came up with.

ADDRESS SECONDS AUDIO
AAAAAAAA
76543210
LL000000 1 "zero"
LL001000 1 "one"
LL010000 1/2 "two"
LL010100 1/2 "three"
LL011000 1/2 "four"
LL011100 1/2 "five"
LL100000 1 "six"
LL101000 1 "seven"
LL110000 1 "eight"
LL111000 1 "nine"

Here's a simple (very) Stamp 2 program to record:

'p0 = A0
'p1 = A1
'p2 = A2
'p3 = A3
'p4 = A4
'p5 = A5
'p6 = A6' MSB must be low to be an address
'p7 = A7' MSB            - " -
'p15 = REC LOW ' low for record
'p14 = PLAY EDGE' low for play
'vm pin 9 = analog in
'RECORD CYCLE SETUP
dirs=255
outs=0
input 8
low 0 '
low 1 '
low 2 '
low 3
low 4
low 5
high 14
high 15
low 6
low 7
rec_loop:
      debug home, "outs= ",bin16 outs,cr,"in8= ",bin in8,cr
      debug "waiting for rec button",cr
'15 is high, not recording
if in8=1 then rec_loop
recording:
     low 15
     debug "recording",cr
if in8=0 then recording

high 15
pause 200

  playback:
   debug "playback:"
   low 14
end
After downloading the program, the stamp will setup pins 0 thru 5 low and wait for the button to be pressed.

On the windows box, start goldwave playing the sound sample, and press the button just before the cursor reaches "zero" and hold it just long enough to record it. Ideally, when you release the button you'll hear the word "zero" out the speaker. If it doesn't come out right, hit the reset on the Stamp and start the .wav over again. (Here is where that five seconds of silence at the start gives you time to get ready). This is the weakest link of the procedure, I'ld like to be able to toggle recording from the computer, but that involves a lot of programming.

Change the line of the stamp program that says "low 3" to "high 3", download it, and run goldwave and press the button to record "one".

Ideally, you'ld be done after recording "nine", but it's easy to let the record run too long (since it's done by hand) and recording the next number will overwrite the End-of-Message marker from the previous number. You'll set up to play "five" and hear "five six".

PLAYBACK

It ended up being easier to write and download a separate program to play the numbers, (also, once the recording is that code isn't needed again, for this ap at least.)

'p0 = A0
'p1 = A1
'p2 = A2
'p3 = A3
'p4 = A4
'p5 = A5
'p6 = A6' MSB must be low to be an address
'p7 = A7' MSB            - " -
'p15 = REC LOW ' low for record
'p14 = PLAY EDGE' low for play
'vm pin 9 = analog in
'PLAY CYCLE SETUP
dirs=255
outs=0
start:
input 8
low 0
low 1
low 2
low 3
low 4
low 5
high 14
high 15
low 6
low 7
play_loop:
if in8=0 then play_now
debug cls,"waiting for play button",cr
debug home, "outs= ",bin16 outs,cr,"in8= ",bin in8,cr,"out14= ",bin out14,cr

goto play_loop
play_now
low 14
debug home, "outs= ",bin16 outs,cr,"in8= ",bin in8,cr,bin out14,cr
if in8=1 then start 
goto play_now:
The procedure is the same, change "low 2","low 3","low 4","low 5" as required set up the address, and it will play the number.

That's it. Setting up the first time is a pain, but once set up I loaded a module in about a half hour. Feel free drop an email if you have questions.