]> git.nbdom.net Git - nb.git/commitdiff
option speed
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 13 Mar 2024 08:24:21 +0000 (09:24 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 13 Mar 2024 08:24:21 +0000 (09:24 +0100)
bin/say

diff --git a/bin/say b/bin/say
index fc5601d3ab872c81147a5c5fd155d8efed67f540..1e26ca10277dddbbf166a8295e14a650591b7cb4 100755 (executable)
--- a/bin/say
+++ b/bin/say
@@ -21,6 +21,7 @@ my $DEBUG = $main::DEBUG = 0;
 ###############################################################################
 my %Opt = (
        'lang' => 'en-gb',
+       'speed' => 160,
 );
 get_options(\%Opt);
 $main::_DATA_ = undef;
@@ -38,7 +39,7 @@ $main::_DATA_ = undef;
 #die $_;
 
 #open(SAY,"| espeak -v mb-en1+f5 -s 140 -m 2>/dev/null") or die $!;
-open(SAY,"| espeak -v $Opt{lang} -m --stdout 2>/dev/null | aplay -q") or die $!;
+open(SAY,"| espeak -v $Opt{lang} -s $Opt{speed} -m --stdout 2>/dev/null | aplay -q") or die $!;
 
 if (@ARGV or -t STDIN) {
   $_ = join(" ",@ARGV);
@@ -165,7 +166,8 @@ Say some text
 
 =head1 OPTIONS
 
- -option[lang=s]        Lang (default: $Opt{lang})
+ -option[lang|l=s]      Lang (default: $Opt{lang})
+ -option[speed|s=i]     Speed (default: $Opt{speed})
  -option[verbose|v+]    Verbose mode: increase the verbosity level.
  -option[debug+]        Debug mode: increase the debug level.
  -option[version|V]     Print version (default: $VERSION)