Millisecond Forums

sound capture file format

https://forums.millisecond.com/Topic28113.aspx

By lir1995 - 1/8/2020

Hi Dave, 

In my experiment, I want to record verbal recall on some of the trials. When I run the code (below), it seems to save the audio file as a .m4a. Do you happen to know if there is a way these files can be saved as .wav? I'm not sure if the problem is something specific to my computer or with my code. 

<trial recalled>
/ stimulustimes = [0 = recall]
/ soundcapture = true
/ validresponse = (noresponse, " ")
/ quit = [" "
]
/ beginresponsetime = 0
/ trialduration = 3000000
/ inputdevice =keyboard
</trial>

Thanks!
By Dave - 1/8/2020

lir1995 - 1/8/2020
Hi Dave, 

In my experiment, I want to record verbal recall on some of the trials. When I run the code (below), it seems to save the audio file as a .m4a. Do you happen to know if there is a way these files can be saved as .wav? I'm not sure if the problem is something specific to my computer or with my code. 

<trial recalled>
/ stimulustimes = [0 = recall]
/ soundcapture = true
/ validresponse = (noresponse, " ")
/ quit = [" "
]
/ beginresponsetime = 0
/ trialduration = 3000000
/ inputdevice =keyboard
</trial>

Thanks!

The format cannot be changed, so there's nothing wrong with your code. If you're unsure whether the format of the files captured is m4a or something else, feel free to attach one of the files (+Insert -> Add File...), and I'll be happy to look at it. Under Windows at least, the files should definitely be WAVs.
By lir1995 - 1/9/2020

Thank you! I'm working on a mac, so I believe the attached file is m4a. It would be helpful for my analysis if it saved it as wav, but I'm not sure if this is possible for mac. 
By Dave - 1/9/2020

lir1995 - 1/9/2020
Thank you! I'm working on a mac, so I believe the attached file is m4a. It would be helpful for my analysis if it saved it as wav, but I'm not sure if this is possible for mac. 

As far as I know it isn't, but conversion to WAV after the fact should be an option if this facilitates analysis. iTunes, for example, should be able to convert the files in bulk like so:

1) Open iTunes, go to "iTunes" > "Preferences" > "General" tab > "Import Settings", and select "Wav Encoder" under "Import Using:"
2) Hold down the Option key and select "File" > "Convert" > "Convert to WAV Encoder." Choose the folder containing the m4a files you'd like to convert, and iTunes should then convert all files in the folder to WAV.

(Alternatively, VLC https://www.videolan.org/vlc/ or ffmpeg https://www.ffmpeg.org/ -- both free and open source -- can also handle bulk conversions.)
By lir1995 - 1/9/2020

Great, thank you!!