# the shebang (#!) line should preceed this line...

#  Kyle R. Burton
#  http://www.voicenet.com/~mortis
#  mortis@voicenet.com
#
# Requirements:
#  * speechd -
#    http://www.op.net/~darxus/speech
#  * Perl (duh)
#
#  Available at http://www.op.net/~darxus/speech
#
#  8/7/99 Darxus moved open/close out of while (1) & added autoflush.
use strict;
use FileHandle;
use vars qw( $VERSION $fifo $line);


$VERSION = '1.1';

$fifo = '/dev/speech';

open FIFO, ">>$fifo" or die "Error opening $fifo for appending ($!)\n";

while (1)
{
 while($line = <STDIN> ) {
   print FIFO $line, "\n";
   autoflush FIFO 1;
 }
}

close FIFO;


__END__

=head1 NAME

catspeech - acts as a /dev/speech specific version of cat.

=head1 SYNOPSIS

catspeech < file.txt

=head1 DESCRIPTION

This program acts almost identicly like the cat(1) program, with the
exception that all output is redirected to /dev/speech.

=head1 SEE ALSO

L<speechd>

=head1 BUGS

No known bugs.

=head1 AUTHORS

Kyle R. Burton I<mortis@voicenet.com>

=cut


