I've been attempting to use the new (to me) microphone functionality for several days. I thought I had finally figured it out, but now no sound will play at all. Even when I switch back to pygame for sound handling. I wanted to use the microphone because, prior to its addition, I was running a subprocess to capture audio (for several years). I thought psychopy microphone would be more transparent, but now I can't play any sound stimuli at all.
When I request information from the sound object, I get it (i.e. getDuration, etc.), so it must be sort of working. I run psychopy from the terminal (1.77.02) and have pyo version (0, 6, 6). I also have EPD 7.2-2 32-bit.
Just to clarify, now NO sound plays, even from old experiment scripts with Pygame specified as the sound handler. (Sound will play outside of python - it's not my computer or speakers; scripts employ sound (using python sound.py via pygame) on other computers in the lab, but no longer mine. Visual stims are still handled fine. subprocesses still run. Only audio is impaired when played inside python)Needs help (is sad),
****************# previous method of to recording subject sound files. (handled sound stimuli with sound.SoundPygame())#!/usr/bin/env pythonfrom psychopy import core, soundimport shlex, subprocesscommand_line = "/Applications/sox-14.3.2/rec -r 44100 -c 1 'whateverfilename.wav'"args = shlex.split(command_line)p = subprocess.Popen(args)# when ready to stop, usually on keypress:p.kill()
***********************# new method of microphone and sound recording (haven't gotten normal sound stimuli to play yet under these circumstances)#!/usr/bin/env pythonimport pyo
from psychopy import prefsprefs.general['audioLib'] = ['pyo']prefs.general['audioDriver'] = ['coreaudio']
from psychopy import core, microphone, soundmicrophone.switchOn()mymike = microphone.AdvAudioCapture(name='advMic', filename='', saveDir='', sampletype=0, buffering=16, chnl=0)
mysound = sound.SoundPygame('whateversoundfile.wav').
print mysound.getDuration()
--You received this message because you are subscribed to the Google Groups "psychopy-users" group.To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/3950adec-5efd-455c-830b-90af617c2b80%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/1eee6118-c842-4b0e-9551-0b78ea108126%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/ac486b93-4599-4165-b837-135319814648%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/99fdb5bb-10cb-44cc-ba6d-9aaf1ca9537e%40googlegroups.com.