Docking ASR requires that the recording provided by FreeSwitch be in PCM 8000Hz wav format

ASR identification interface

1. Description:

Through this API, the text information audio file format requirements of the audio file are recognized: PCM, 8000Hz, wav. Files in other formats are not currently supported.

The audio file size does not exceed 1 minute.

The interface returns the entire audio recognition result.

 

Need to set up the Freeswitch recording dialplan program like this

<action application="set" data="record_sample_rate=8000"/>
<action application="set" data="RECORD_STEREO=false"/> //Whether it is stereo recording false is mono 
<action application="export" data="RECORD_STEREO=false"/>
<action application="set" data="media_bug_answer_req=true"/> //Whether to start recording only after it is connected
<action application="set" data="RECORD_MIN_SEC=1"/> //The minimum recording time here is 1 second, generally 3 seconds or more is meaningful for recording
<action application="record_session" data="records/${strftime(%Y-%m-%d)}/${strftime(%Y -%m-%d-%H-%M-%S)}_${destination_number}_${caller_id_number}.wav"/>

  //Here is the path of the recording file and the format is wav. If the format is not filled in, it is the original audio recording
 

Guess you like

Origin blog.csdn.net/gredn/article/details/114392136