From your code, I'm a bit unclear as to which part actually takes too long.
Is it this line?
my $response = $ua->get("http://127.0.0.1:8000/speech_to_text/?file_pa
+th=$tmpname.wav");
... or is there anything else?
I'm not sure how AGI programs work. Maybe you can only send one action per invocation, so you have then to find out when recording the file ended?
|