Module speex
[show private | hide private]
[frames | no frames]

Module speex

Module: speex

by David McNab <david@rebirthing.co.nz>

This Python module implements a Python wrapper to the Speex speech codec, (http://www.speex.org), providing a class called 'speex' which can be used to encode and decode streams of audio speech data
Function Summary
  new(...)
new(): Create a new speex speech stream object

Function Details

new(...)

new(): Create a new speex speech stream object

Arguments:
  • quality - 0 (lowest) to 10 (highest), default 8
The created speex stream object has two methods:
  • encode - encode a block of speech audio data

    Arguments:
    • block of audio data, as sequence of frames, where each frame is an int
    Returns:
    • raw string containing encoded data, or empty string if there is not yet any encoded data available
  • decode - decodes a block of speech audio data

    Arguments:
    • block of encoded data, as raw string,
    Returns:
    • block of audio data, as sequence of ints, or an empty sequence if there is no decoded data available yet
Notes:
  • Both of these methods use internal buffering, which means that you can feed in data piecemeal. This helps a lot when sending and receiving data over the net.

Generated by Epydoc 1.1 on Wed Mar 5 18:59:18 2003 http://epydoc.sf.net