0

I need to program a function that records an audio response, but when the voice of the person speaking reaches a certain intensity I need to know it on-line. Currently I am using this for recording:

PsychPortAudio('GetAudioData')  

I can't analyze the intensity of the voice (using norm for example) on-line.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
user552231
  • 1,095
  • 3
  • 21
  • 40

1 Answers1

1

You should be able to do this with the analoginput command.

AI = analoginput('winsound');
addchannel(AI,1);

Then use:

x = getdata(AI, t);

To collect it. You'll need to set up some buffer length (say 1 second) and get the data, then perform whatever amplitude analysis you want.

prototoast
  • 598
  • 1
  • 4
  • 9