psychopy.org | Reference | Downloads | Github

Problem recording audio clips in Mac OSX via pyo


#1

Device Macbook Pro
OS Mac OSX Mojave 10.14

Psychopy version Standalone version 3.0.5 (OSX)
Audio Library [‘pyo’]

Problem encountered Running a sample script to record audio clip, resulting in empty (blank) WAV files.

Diagnostics

  1. Printed out sound.backend.get_input_devices()
  2. Located the current selected audio input device and the respective channel index
  3. When calling microphone.AdvAudioCapture, I pass in chnl=0
  4. The code went through with no exception, however the final .WAV file generated have no audio.
  5. I have tried portaudio or coreaudio, neither worked.

I have tried the above methods in bootcamp mode (Windows) and audio recording works (after customizing the channel according to the selected input device).

Attached is the sample audio recording script.

pyo-sound-test.py (608 Bytes)

Is anyone else experiencing this issue?

I know OSX have recently introduced a privacy setting in audio recording, even though I had permitted PsychoPy3 to access the audio input, it doesn’t really make any difference. Would the additional security setting have cause this?


#2

Hi, I also encountered such a problem…Did you solve it?


#3

I’ve only been able to solve it by switching to Windows mode via Bootcamp, and select audio channel 1 instead of the default 0.

Check out my notes here for the fix for Windows in Macbook pro.

This should have been integrated as part of the psychopy 3.0.6 release. Note: this fix is only for Windows mode.


#4

Thank you Wil, I’ll try. Thank you.