[asterisk-bugs] [JIRA] (ASTERISK-29784) How can I reduce the time taken by wav file to save in /tmp folder

srikanth aawula (JIRA) noreply at issues.asterisk.org
Thu Dec 2 00:32:34 CST 2021


srikanth aawula created ASTERISK-29784:
------------------------------------------

             Summary: How can I reduce the time taken by wav file to save in /tmp folder
                 Key: ASTERISK-29784
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29784
             Project: Asterisk
          Issue Type: Improvement
      Security Level: None
          Components: Applications/app_record
    Affects Versions: 16.19.1
            Reporter: srikanth aawula
            Severity: Critical


I'm using the perl script to save the audio files generated from asterisk. I want to convert the audio files to text using STT engine but while saving the audio files in /tmp directory it is taking time nearly 1 minute and sometimes more than that and before saving the files the STT gets called and fetches for the wav file and ultimately failing to give a text file

this is the code I'm using




my ($fh, $tmpname) = tempfile("stt_XXXXXX", DIR => $tmpdir, UNLINK => 1);
print "RECORD FILE $tmpname wav \"$intkey\" \"$abs_timeout\" $beep \"$silence\"\n";
@result = checkresponse();
die "$name Failed to record file, aborting...\n" if ($result[0] == -1);

if ($debug) {
    warn "$name Recording Format: $format, Rate: $samplerate Hz, ",
        "Language: $language, ", "$silence, Interrupt keys: $intkey, Beep: $beep\n";
}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list