Spanish Italian
17456 Users    

A look at the dsPIC Audio and Speech Starter Kit Part 2 of 2

  Download PDF version of the Article

Before we start with the Speech Record and Playback demo, here’s a list of things that are needed for this demo.
You first need the MPLAB starter kit for dsPIC DSCs. Note that you don’t need to program the starter kit board for the demo since the board is preprogrammed. You will need a set of headphones and a microphone. The ones that are usually used, the PCs, will work well with the board. Note that these are not provided with the kit. You are now ready to setup the demo.
The starter kit board is factory programmed with the Speech Record and Playback demo application. This application stores speech signals and plays them back when requested.
To setup the board to use the demo, connect a microphone to the line in/mic socket j9. Connect a headphone to speaker socket j8. Ensure the mic gain potentiometer r56 is set at the factory default level. The arrow on the potentiometer wiper should align with the arrow mark on the board.
Set jumper j6 to codec position. Set jumper j7 to mic position. Connect the board to the PC using the USB cable. You won’t need MPLAB IDE to run the demo.
An introductory message will now play on the headphones. This message introduces the Speech Record and Play demo. This introductory message is stored on the serial flash memory device in an encoded form using the g.711 compression technique.
The demo application can switch between two modes. In the record mode, the speech received through the microphone is processed and stored on the board’s serial flash memory. In the playback mode, speech data stored on the board’s serial flash memory is processed and reproduced on the headphones.
From the previous setup, an introductory message should be playing back on the headphones. This message will be similar to the instructions you are about to be given concerning recording and playback of your own audio. But first, here is a description of how the recording works.
When you press switch S1, the red LED will turn on. This indicates that the application is preparing the serial flash memory for recording speech data by erasing the user section of the flash memory. Once the erase operation is complete, the red LED will turn off and the yellow LED will turn on indicating that the application is in the record mode and is now recording. As you speak into the microphone, the application will acquire the digitized speech signal from the codec, compress this data using the g.711 compression technique and store the compressed data in the serial flash memory.
The serial flash memory is capable of storing approximately one minute of speech while using the g.711 compression technique. When the serial flash memory has reached capacity, the application will automatically stop recording and switch to playback mode. Pressing switch S1 again will cause the erase and record process to start all over again.
So, to record your own audio, press switch S1, wait for the red LED to turn off and the yellow LED to turn on before recording. Record a message of approximately one minute or less.
To playback the audio you recorded in the previous step, press switch S2. The green LED will turn on and the application is now in playback mode. Speech data stored in the serial flash is decompressed, converted to an analog signal by the codec and played out into the headphone via the headphone amplifier. The playback operation will keep repeating till a new recording is started by pressing switch S1. The green LED will turn off. The stored speech data is erased when a new recording is performed.
This brings us to the end of the starter kit tutorial.

See also: Microchip’s MPLAB starter kit for dsPIC digital controllers

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
15 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Who's new

  • frederickdark
  • fernand
  • Ligrock
  • paolo_0665
  • chanuei
  • JM
  • samsilva77
  • araghube
  • stoll
  • mt

Who's online

There are currently 0 users and 85 guests online.