NAME

Audio::FileWave - Simple waveform abstraction for use with Audio::TTS

SYNOPSIS

$wave = new Audio::FileWave $type, $data;

set_play_command Audio::FileWave $type $command;

play $wave;

free $wave;

DESCRIPTION

This is a simple class which represents a waveform. It is designed for use by the Festival::TTS module, if you want to play waveforms some other way you need to supply another class which implements this interface.

This class maintains a table mapping file types to play commands. When the command is called the string `WAVE' is replaced by the filename of the data. If you don't set up a command for the waveform type Festival::TTS requests, the default command `na_play WAVE' is used. The na_play command is part of the Edinburgh Speech Tools and so if you have festival you should also have it.

set_play_command Festival::FileWave $type $command;

Sets the play command to be used for files of the given type.

$wave = new Festival::FileWave $type, $data;

Create a waveform from the given data which is of type $type. Actually saves it to a file.

free $wave;

Free the resources used for the waveform. (unlinks the file).

play $wave;

Play the waveform. Calls the command associated with the file type.

AUTHOR

Richard Caley, R.Caley@ed.ac.uk

SEE ALSO

Festival::TTS, perl(1), festival(1), Festival Documentation