Created
October 20, 2010 14:01
-
-
Save Lizdo/636464 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
### Convert Audio for iPhone Project | |
import os.path | |
import subprocess | |
import shutil | |
def main(): | |
dir = '/Users/Liz/Dropbox/Projects/BoardGame/Sound' | |
files = os.listdir(dir) | |
os.chdir(dir) | |
for file in files: | |
if file.endswith('m4a'): | |
newfile = file.replace('m4a','caf') | |
print(newfile) | |
commandlist = ['/usr/bin/afconvert', '-f', 'caff', '-d', 'LEI16',file,newfile] | |
subprocess.call(commandlist) | |
os.remove(file) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment