This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Yu's Question about typical audio input & output system

Hello:

I am using DSP not for quite a long time and I am now conducting the course project.

This project requires the real-time recognition of the mammal voice using C6713 and CCSv5.

 

First, it is important for me to use the classical audio input&output software template I procured. This prj realized using the C6713 to input the two-channel music signal and output the music without any change.  Since this project does not need to do any signal processing on the music samples, namely, it does not need to store large frames of sample into the memory, this project did not allocate any buffers such as ping-pong structure or DMA techniques for real-time processing.

 

My question is that:

If I want to input the 10-second wav format signal of my voice into the DSK and preserve this 10-second samples (almost several million samples because my sampling rate is 96khz) into the memory and then use the graphs of CCS to see the shape of this signal and compare this shape with the plot generated from the matlab (the matlab also reads in my wav voice), what additional actions should I do?

 

Because I need to do audio signal processing, I am very eager to see whether I can successfully store the 10-sec voice into the DSK.  If the graphs of the preserved voice sample is as same as that from matlab, I would be happy that I have stored my voice into the DSK.

 

But there are several technical problems and that's why I want to ask the technicians:

 

1-Due to 96khz sampling rate, 10-sec long voice signals means several million samples and I probably need to find memory that is large enough to store it.

 

2-If I only store 10-sec voice into my DSK and do not output it, real-time realization is unnecessary.  Hence what is the specific steps to store millions of samples into, for instance, CE0, external SDRAM?

 

3-From the watch window, I found that some sample values are pretty large. How can I bound the samples into the [-1, 1] range just like the matlab. (Because matlab plot bounds the y axis into [-1, 1])?

 

To help you understand, I snapshot the audio input&output code:

 

 

Remark: from the ISR, you can see that the reading and outputing the samples are done via ISR and API functions of the McBSP.  temp.combo stores the instantaneous left-right channel samples.

 

Now I want to store a 10-sec voice into the external memory and eliminate the McBSP_write function, what should I do?

 

Should I do it outside the ISR or inside the ISR?

Should I use other buffers or DMA techniques?

Should I write assembly language to realize the preservation?

 

Thank you very much!

 

  • Hi,

    Thanks for your post.

    I understand that, you need to store a 10-sec voice and apply signal processing algorithms to evaluate the output samples through plotting via MATLAB tools but not really sending it to DAC output. I think, the chosen external memory SDRAM/DDR would be appropriate enough to store 10-sec voice sample and to process the same. But truncating pretty large samples into MATLAB plot range [-1,1] as you specify above wouldn't be so easy to round off the samples which would lead to inaccuracy. Better to think off the real-time capture of voice samples and expand the MATLAB plot range to the actual captured samples to evaluate & compare the same values. I hope, we could expand the MATLAB plot range instead of truncating the actual voice samples.

    To store a 10-sec voice samples, the better place holder for the code to be appropriate is would be inside the ISR after the McBSP reading the input audio samples from the AIC23 ADC codec and you can copy the input samples to a temporary buffer from which you can call memory copy (memcpy) routine to copy the 10-sec input data from the temp. buffer to the external SDRAM memory address range and this can be used for signa processing & tuning the voice samples to evaluate the same through plotting graph tools. I don't think really, DMA technique is needed to execute this and this can be done using simple buffer copy techniques.

    Other than, optimizing the CPU cycle count performance, assembly intrinsics are not really required to do real-time signal processing on preserved voice samples and there is no necessity to write assembly code to do the same.

    Thanks & regards,

    Sivaraj K

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

    Please click the Verify Answer button on this post if it answers your question

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

  • Thank you very much!

    You really gave me very comprehensive and awesome answers!
    I am a new learner and my biggest problem is that I have no friends around me who could help with DSP development.

    Best regards