0

Let me give a bit of background. I'm running a neuro-psych experiment which requires subjects to listen to many pairs of sentences and determine if each pair is the "same" or "different". The audio for the sentences appears on one channel of the .wav file, and their recorded answers appear on the second channel.

Normally this is analyzed manually by listening to everything and determining: 1. If they were correct. 2. How long they took to respond.

My question is, how can I get Python to run through the .wav file and calculate these automatically? Or more specifically, how can python analyze an event in one channel of a wav file and calculate the time to a second event in another channel of the .wav file?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
Toby
  • 1
  • Could be of help: http://stackoverflow.com/questions/34416283/how-to-properly-decode-wav-with-python – keiv.fly Jul 24 '16 at 20:20
  • 1
    It might be much easier to analyze if you let them press button "A" or button "B" instead of recording their oral response and doing voice activity detection and speech recognition. – Matthias Jul 30 '16 at 09:47
  • Look into the wave module. Left and right stereo channels are interleaved. Once you've extracted the appropriate channel, you'll want to apply a gate to cancel out the noise floor, which will require choosing the appropriate threshold. Now, the first signal > 0 you observe will most likely be the answer. Using basic sampling theory you can calculate how much time has elapsed. I have to say though, Matthias's answer is remarkably more efficient. – reas0n Oct 04 '16 at 20:18

0 Answers0