Nimm doch einen online-converter!
Ich habe dir einmal einen Skript geschrieben, der es macht:
(Nenne ihn z.B.: getspeech.pl .)
Code:
#!/usr/bin/perl -w
use strict;
use warnings;
my $res;
my $r1=shift @ARGV || "";
my $r2=shift @ARGV || "";
my $r3=shift @ARGV || "";
my $r4=shift @ARGV || "";
my $r5=shift @ARGV || "";
my $r6=shift @ARGV || "";
my $r7=shift @ARGV || "";
$res=`wget 'http://vozme.com/text2voice.php?lang=en&gn=fm&text=$r1 $r2 $r3 $r4 $r5 $r6 $r7' -q -O - | grep http://vozme.com/speech`;
$res=~m/\"(.*?)\"/;
`wget -q -O text.mp3 $1`;
Gib zum Beispiel ein:
Code:
perl getspeech.pl are you well
Danach steht der Text in der mp3-Datei text.mp3.
Die kannst du mit mpd oder irgend etwas abspielen.
(Du kannst den Skript auch leicht abändern, dass der Text gleich abgespielt wird.
Vorher playlist mit "mpc save" speichern.)
Code:
#!/usr/bin/perl -w
use strict;
use warnings;
my $res;
my $r1=shift @ARGV || "";
my $r2=shift @ARGV || "";
my $r3=shift @ARGV || "";
my $r4=shift @ARGV || "";
my $r5=shift @ARGV || "";
my $r6=shift @ARGV || "";
my $r7=shift @ARGV || "";
$res=`wget 'http://vozme.com/text2voice.php?lang=en&gn=fm&text=$r1 $r2 $r3 $r4 $r5 $r6 $r7' -q -O - | grep http://vozme.com/speech`;
$res=~m/\"(.*?)\"/;
`mpc clear`;
`mpc add $1`;
`mpc play 1`;
Sollte klappen! (Konnte es nicht testen: Es ist Nacht und ich will keinen Ärger mit dem Nachbarn.)
Und für deutschen Text:
Code:
#!/usr/bin/perl -w
use strict;
use warnings;
my $res;
my $r1=shift @ARGV || "";
my $r2=shift @ARGV || "";
my $r3=shift @ARGV || "";
my $r4=shift @ARGV || "";
my $r5=shift @ARGV || "";
my $r6=shift @ARGV || "";
my $r7=shift @ARGV || "";
`wget 'http://www.rockle.com/cgi/tts/speak.cgi' --post-data='t=$r1 $r2 $r3 $r4 $r5 $r6 $r7 &l=g' -O text.mp3`