2008-07-15: Selected articles (including this one) now have experimental "comment" links in the left column and at the bottom. You're welcome to use them for commenting and voting on articles. For a bit more on this, see this page. /F

The aifc module

This module reads and writes AIFF and AIFC audio files (as used on SGI and Macintosh computers).

Example: Using the aifc module
# File: aifc-example-1.py

import aifc

a = aifc.open("samples/sample.aiff", "r")

if a.getnchannels() == 1:
    print "mono,",
else:
    print "stereo,",

print a.getsampwidth()*8, "bits,",
print a.getframerate(), "Hz sampling rate"

data = a.readframes(a.getnframes())

print len(data), "bytes read"

$ python aifc-example-1.py
mono, 16 bits, 8012 Hz sampling rate
13522 bytes read
 
[comment on/vote for this article]

A Django site. this page was rendered by a django application in 0.03s 2008-07-25 10:12:28.209650. hosted by webfaction.