Class a.s.RecordJob(object):

Part of aculab.speech View Source View In Hierarchy

Job to record a file.
Method __init__ Create a RecordJob.
Method start Generic job interface method
Method done Generic job interface method.
Method on_read Reactor callback.
Method stop Generic job interface method.
def __init__(self, channel, f, max_octets=0, max_elapsed_time=0.0, max_silence=0.0, elimination=False, agc=False, volume=0, filetype=None): (source)

Create a RecordJob.

Related Aculab documentation: sm_record_start.

See SpeechChannel.record for a shorthand.
ParameterschannelThe SpeechChannel that will do the recording.
f

Either a filename or a fd for the file to record.

If a string is passed in, the associated file will be opened for writing and closed upon completion. Filename extensions will be treated as a hint for the file type, but only if filetype is not None. Currently recognized filename extensions are .al, .ul and .sw. If a fd is passed in, the file will be left open and not be reset to the beginning.
max_octetsMaximum length of the recording (in bytes)
max_elapsed_timeMaximum length of the recording in seconds.
max_silenceMaximum length of silence in seconds, before the recording is terminated.
eliminationActivates silence elimination if not zero.
agcNonzero values activate Automatic Gain Control
volumeThe volume adjustment in db.
filetypeThe file type. If no type can be deduced from the filename, kSMDataFormatALawPCM will be used.
def start(self): (source)

Generic job interface method

Start the recording.

Applications should use SpeechChannel.record or SpeechChannel.start.
def done(self): (source)
Generic job interface method.
def on_read(self): (source)

Reactor callback.

Called whenever recorded data is available.
def stop(self): (source)

Generic job interface method.

Stop the recording.

Applications should use SpeechChannel.stop to stop a pending job.
API Documentation for pyAculab, generated by pydoctor at 2009-01-02 15:12:29.