iFLYTEK Voice SDK Download and Testing

1. SDK download

  1. Enter the official website of iFlytek development platform http://www.xfyun.cn/ , register and log in in the upper right corner, and click to download the SDK after logging in.

  

        2. Create a new application

     

        3. Fill in relevant information

        4. After creation and submission, return to the SDK download page, refresh the page, select the previously created application for the application, select Linux for the platform, select offline command recognition for the SDK, and click SDK download.

  • 2. Offline package testing
  1. Unzip the downloaded offline package

        2. View README description

        3. Compile source code

        4. Run the code

(Note: You need to cd to the bin directory to run, otherwise the dictionary will not be found)

        5. View the recognition results

  • 3. Additional exercises

        1. Modify the asr_offline_sample.c file to change the output content

        路径:Linux_aitalk_exp1227_3fac9f12/samples/asr_offline_sample

 

   

        Recompile and run

        Recognition results

   

        The recognition result here is still the previous "Call Ding Wei" instead of our modified "Call 10086". This is because we only modified the content output by printf, and when we select the audio file to be recognized, it is actually recognized. is the corresponding audio file in bin/wav/.

   

        2. Move the recognized voice out of the bin/wav directory, and the voice recognition will fail.

        3. The keywords for speech recognition are stored in the bin/call.bnf file. If you modify the keywords in the file, the speech will not be recognized.

In addition, you need to replace the keywords in the dictionary update function in asr_offline_sample.c with other content or delete them.

        Compile and run:

        After the modification, there is no "Ding Wei" in the dictionary file, and the update function does not update the keyword "Ding Wei" into the dictionary, so there is no recognition result in speech recognition. There is no yellow pepper in the dictionary originally, but the update function during compilation changes the keyword "Ding Wei" "yellow pepper" is updated to the dictionary, so "yellow pepper" can be successfully recognized.

Guess you like

Origin blog.csdn.net/weixin_54241007/article/details/127791608