wiki restore 2013-01-23
|Deletions are marked like this.||Additions are marked like this.|
|Line 1:||Line 1:|
= Audio in Python =
This page tries to provide a starting point for those who want to work with audio in combination with Python.
If you are creating a game, most of what you are looking for may already be included in the many [[PythonGameLibraries|PythonGameLibraries]] that are available.
If you are looking for podcasts related to Python, go to the [[PythonAudioMaterial|PythonAudioMaterial]] page.
== Built in modules ==
The [[http://docs.python.org/lib/mmedia.html|Multimedia Services]] allow for some basic audio functionality in Python. It consists of the following modules:
||[[http://docs.python.org/lib/module-audioop.html|audioop]] ||Manipulate raw audio data. ||
||[[http://docs.python.org/lib/module-aifc.html|aifc]] ||Read and write audio files in AIFF or AIFC format. ||
||[[http://docs.python.org/lib/module-sunau.html|sunau]] ||Provide an interface to the Sun AU sound format. ||
||[[http://docs.python.org/lib/module-wave.html|wave]] ||Provide an interface to the WAV sound format. ||
||[[http://docs.python.org/lib/module-chunk.html|chunk]] ||Module to read IFF (e.g. AIFF) chunks. ||
||[[http://docs.python.org/lib/module-sndhdr.html|sndhdr]] ||Determine type of a sound file. ||
||[[http://docs.python.org/lib/module-ossaudiodev.html|ossaudiodev]] ||Access to OSS-compatible audio devices (mainly important for Linux / FreeBSD) ||
||[[http://docs.python.org/library/winsound.html|winsound]] ||Access to the basic sound-playing machinery provided by Windows platforms. ||
== Beyond the default modules ==
Alternatively, you might want to learn about audio programming in Python. There is a veritable forest of stuff out there, but here are some good starting points.
For a complete overview have a look at [[PythonInMusic|PythonInMusic]].
=== Platform independent ===
||[[http://nsound.sourceforge.net|Nsound]] ||C++ library with Python module for audio synthesis. ||
||[[http://pypi.python.org/pypi/pyaudiere/0.2|PyAudiere]] ||A high-level audio interface for Python. (deadlink) ||
||[[http://pydub.com|Pydub]] ||A high-level audio interface for Python. Uses ffmpeg for formats other than WAVE ||
||[[http://people.csail.mit.edu/hubert/pyaudio/|pyAudio]] ||Python bindings for [[PortAudio|PortAudio]] audio input and output ||
||[[http://www.speech.kth.se/snack/|Snack]] ||Playback, recording, file and socket I/O, waveforms and spectrograms. "Last release 2004-12-01. Dead?" ||
||[[http://sourceforge.net/projects/audiotools/|Python Audio Tools]] ||Programs for CD-ripping and conversion between audio file formats. ||
Part of a [[http://albertz.github.com/music-player/|music player]]. It uses FFmpeg for decoding and [[PortAudio|PortAudio]] for output. It also has the functionality to calculate the [[ReplayGain|ReplayGain]] value and do loudness normalization, to calculate the [[AcoustId|AcoustId]] fingerprint, to get the metadata (via FFmpeg) and to calculate a visual representation for a sound file.
=== Platform dependent ===
http://pypi.python.org/pypi/audiosocket/ - pure Python solution to play audio on Windows
=== Modules relying on closed source ===
A wrapper around the [[http://www.fmod.org|FMOD]]-library offering plenty of options including 3D sound and effects. FMOD is a popular closed, but free for own use, that is used in many commercial game titles.
|Hi, everybody! My name is Jayson. <<BR>>
It is a little about myself: I live in United States, my city of Flint. <<BR>>
It'[[http://Www.Thefreedictionary.com/s+called|s called]] often Eastern or cultural capital of MI. I've married 4 years ago.<<BR>>
I have two children - a son (Riley) and the [[http://Www.Adobe.com/cfusion/search/index.cfm?term=&daughter&loc=en_us&siteSection=home|daughter]] (Bertie). We all like Kiteboarding.<<BR>>
My blog post :: [[http://mayvanphongonline.com.vn/cat/70/may-chieu.html|Chuyên cung cấp máy chiếu chính hãng với giá cả tốt nhất thị trường]]
Hi, everybody! My name is Jayson.
It is a little about myself: I live in United States, my city of Flint.
It's called often Eastern or cultural capital of MI. I've married 4 years ago.
I have two children - a son (Riley) and the daughter (Bertie). We all like Kiteboarding.
My blog post :: Chuyên cung cấp máy chiếu chính hãng với giá cả tốt nhất thị trường