fixing renderText script

This commit is contained in:
2026-06-11 15:14:00 +02:00
parent 3e922883f7
commit 9ad6b15130
302 changed files with 120914 additions and 20 deletions
Executable
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/perl
require LWP::UserAgent;
my $url = "https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&lang=en-US";
my $audio = "";
open(FILE, "<" . $ARGV[0]);
while(<FILE>)
{
$audio .= $_;
}
close(FILE);
my $ua = LWP::UserAgent->new;
my $response = $ua->post($url, Content_Type => "audio/x-flac; rate=16000", Content => $audio);
if ($response->is_success)
{
print $response->content;
}
1;