Hi the community,
Operating System: Windows-10-10.0.18362-SP0
version: psychopy3
python 3.6
I am trying to create sound components with audio files. The .wav files are under the same parent folder as the project file. In the condition file, the relative path to each .wav file is given and the sound component path is set up with the column name.
What did you try to make it work?:
I have tried change the file name to .aiff and I am sure the path should have no errors. I also installed FFmpeg so that the .wav can be handled.
What specifically went wrong when you tried that?:
Traceback (most recent call last):
File "E:\UNC\PhD\Comp ex and Disser\Proposal\Psychopy\WM verbal\WMverbal_lastrun.py", line 115, in <module>
sound_1.setSound(savepath, hamming=True)
File "E:\Installed_program\PsychoPy3\lib\site-packages\psychopy\sound\backend_sounddevice.py", line 361, in setSound
_SoundBase.setSound(self, value, secs, octave, hamming, log)
File "E:\Installed_program\PsychoPy3\lib\site-packages\psychopy\sound\_base.py", line 195, in setSound
self._setSndFromFile(p)
File "E:\Installed_program\PsychoPy3\lib\site-packages\psychopy\sound\backend_sounddevice.py", line 395, in _setSndFromFile
self.sndFile = f = sf.SoundFile(filename)
File "E:\Installed_program\PsychoPy3\lib\site-packages\soundfile.py", line 627, in __init__
self._file = self._open(file, mode_int, closefd)
File "E:\Installed_program\PsychoPy3\lib\site-packages\soundfile.py", line 1182, in _open
"Error opening {0!r}: ".format(self.name))
File "E:\Installed_program\PsychoPy3\lib\site-packages\soundfile.py", line 1355, in _error_check
raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
RuntimeError: Error opening 'Sam_stopped_the_fire.wav': File contains data in an unknown format.
Thanks,