[Artificial Intelligence] HKUST Xunfei API Interface Call (Part 1)

foreword

There is an artificial intelligence education course in this semester, and there happens to be such a practice that requires artificial intelligence interface calls

Therefore, HKUST Xunfei was the first choice. The following is a detailed process record

iFLYTEK interface call

The following is a description of the process and implementation details

call process

first step

Come to iFLYTEK open platform http://www.xfyun.cn

The second step is to register an account

The response may not be so fast when registering, just wait a moment

The third step is to determine the API interface to be called

Here I choose to call the HKUST Xunfei API interface to realize handwritten text recognition

insert image description here

The fourth step is to create an application
insert image description here

insert image description here
insert image description here

The fifth step to receive a free package

Real-name authentication will be prompted

insert image description here

insert image description here

insert image description here

insert image description here

Step 6 View the development documentation

insert image description here

insert image description here
Step 7 Download the demo and start testing

Fill in the corresponding APPID and APIKey in the code
insert image description here

insert image description here
language reset

insert image description here
insert image description here

Modify the path of the image

insert image description here
After the modification, it is ready to run, and it is found that a project must be created

insert image description here
insert image description here

insert image description here
Found Chinese handwriting recognition garbled characters

The problem to be solved is to output the content of the bytes type in the form of Chinese characters, but this part of the content is of the string type. Therefore, it is first necessary to convert the str into bytes type, and then decode it into str output.

insert image description here

summary

I remember that the speech recognition of HKUST Xunfei is very amazing. This time, I chose a relatively unpopular handwriting recognition to test, and found that it is still wide, but there is still a lot of room for improvement.

With the explosion of ChatGPT, it is time to pay attention to whether artificial intelligence is the next outlet~

Guess you like

Origin blog.csdn.net/lion_no_back/article/details/129230606