Previous topic

evaluate module

Next topic

lsh module

This Page

sound module

class bregman.sound.WavOpen(arg, n=None, verbosity=1)
WavOpen: sound-file handling class
wav = WavOpen(filename,n)
filename - sound file to open
n - chunk size per read [0=all frames]
bregman.sound.play(data, fs=44100)
Wrapper function for Bregman’s play_snd(data, sample_rate) using system audioplayer. Install scikits.audiolab for native Python sound playback
bregman.sound.play_snd(data, sample_rate=44100)
Bregman Linux/OSX/Windows sound player function.
data - a numpy array
sample_rate - default 44100
bregman.sound.wav_read(wav_name)
Utility routine for reading wav files, use scikits.audiolab if available
otherwise uses wave module.
bregman.sound.wav_write(signal, wav_name, sample_rate)
Utility routine for writing wav files, use scikits.audiolab if available
otherwise uses wave module
bregman.sound.wavread(filename)

Wrapper function for Bregman’s wav_read(filename) using python built-ins. Install scikits.audiolab for more efficient sound I/O

Returns:
data [ndarray] sample_rate [int] fmt [‘pcm16’]
bregman.sound.wavwrite(signal, wav_name, sample_rate)

Wrapper function for Bregman’s wav_write(data, filename, sample_rate) using python built-ins. Install scikits.audiolab for more efficient sound I/O

Returns:
True - if successful