Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.38 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use strict;
  3. use Speech::eSpeak ':all';
  4. package course; {
  5. sub new{
  6. my $filename = 'capacitation.txt';
  7. my $speaker = Speech::eSpeak::new({datadir=>'/usr/share/mbrola'});
  8. open(my $fh, $filename)
  9.   or die "Could not open file '$filename' $!";
  10. while (my $row = <$fh>) {
  11.   chomp $row;
  12.   print "$row\n";
  13.   $speaker->speak("$row");
  14. }
  15. }
  16. }
  17. my $cap = course->new();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement