View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Richard Caley > speech_pm_1.0 > Audio::FileWave



Annotate this POD

View/Report Bugs


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


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

    set_play_command Audio::FileWave $type $command;

    play $wave;

    free $wave;


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.


Richard Caley,


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

syntax highlighting: