Skip to content

Instantly share code, notes, and snippets.

@giginet
Created June 25, 2011 01:02
Show Gist options
  • Save giginet/1045973 to your computer and use it in GitHub Desktop.
Save giginet/1045973 to your computer and use it in GitHub Desktop.
iPhoneSoundConverter.py
import os
import sys
path = sys.argv[1] if len(sys.argv) >= 2 else os.getcwd()
os.chdir(path)
for file in os.listdir(path):
filename, ext = os.path.splitext(file)
if ext in ('.wav', '.mp3', '.aif'):
os.system('/usr/bin/afconvert -f caff -d LEI16 %s %s.caf' % (file, filename))
print 'create %s.caf' % filename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment