Dropped final character in saved filename with mic.record #875
Comments
This is a bug, will fix. The issue is not the length of the filename, but the fact that it ends with an 'a'. The bug is that if a filename is given to .record(), any trailing '.wav' is supposed to be removed, but that is done incorrectly and removes any of the characters w, a, v, or . Possible work arounds:
|
peircej
added a commit
that referenced
this issue
Mar 16, 2015
BF: microphone filename .wav; closes #875
peircej
added a commit
that referenced
this issue
Jul 20, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
filename = '../data/20150312094043_voice_ID1000_S001_T001_R001_pataka'
microphone.switchOn()
core.wait(3)
mic.microphone.AdvAudioCapture(name='mic', stereo = False)
mic.record(sec=20, block=False, filename = filename + '.wav')
Using this line to specify file name results in 20150312094043_voice_ID1000_S001_T001_R001_patak.wav instead of 20150312094043_voice_ID1000_S001_T001_R001_pataka.wav
Note the dropped 'a' at the end of pataka
However, by adding an intermediate character in the concatenation, all characters are used.
mic.record(sec=20, block=False, filename = filename + '123456' + '.wav')
20150312094043_voice_ID1000_S001_T001_R001_pataka123456.wav
This could be my misunderstanding of how python concatenate works somehow.
This error does not happen with a shorter filename e.g. filename = '../data/mySubject1234' writes out as mySubject1234.wav
Using Psychop v1.81.03 on mac 10.8.2
Thanks.
The text was updated successfully, but these errors were encountered: