pyao 0.0.2
pyao is a wrapper for the 'ao' library. pyao is a set of Python bindings for Xiph.org's libao, a cross-platform audio output libra
|
|||||||||||||||||||
pyao is a wrapper for the 'ao' library.
pyao is a set of Python bindings for Xiph.org's libao, a cross-platform audio output library.
Installation:
python config_unix.py
python setup.py build
[as root] python setup.py install
The config script is new and still pretty weak. If you have any problems let me know. Access the module by using "import ao" in your Python code.
Here's an interactive session of just playing with the module, until I create better documentation (there should be docstrings for everything). Watch as I read some random data and "play" it to a wave file.
>>> import ao
>>> myoptions = {'file': 'myoutput.wav'}
>>> dev = ao.AudioDevice('wav', options = myoptions)
>>> f = open('/dev/urandom', 'r') #that's some good stuff
>>> print dev
< AudioDevice object at 0x812ac28 >
>>> print dev.get_driver_info()
{'author': 'Aaron Holtzman',
'short_name': 'wav',
'name': 'WAV file output',
'comment': 'Sends output to a .wav file'}
>>> print ao.get_driver_info('oss')
{'author': 'Aaron Holtzman',
'short_name': 'oss',
'name': 'OSS audio driver output ',
'comment': 'Outputs audio to the Open Sound System driver.'}
>>> data = f.read(1024*8)
>>> dev.play(data)
>>> < control-d >
And now I have a file myoutput.wav with random noise in it.
tags
Download pyao 0.0.2
Authors software
|
|
Similar software
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Other software in this category
|
|
|
|
|
|
|
|
|
|
Featured Software
jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java
Opera 9.02
Surf the Internet in a safer, faster, and easier way with Opera browser
GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell
- Communications
- Database
- Desktop Environment
- Games
- Internet
- Multimedia
- Office
- Programming
- Science and Engineering
- System
- Text Editing&Processing
