This topic describes how to enable the speech-to-text feature in an AI Chat application.
Step 1: Create an Alibaba Cloud Intelligent Speech Interaction speech recognition project
Go to Alibaba Cloud Intelligent Speech Interaction and enable the service.
Go to Alibaba Cloud Intelligent Speech Interaction - All Projects and create a project.
Create a project. Select Speech Recognition + Speech Synthesis + Speech Analysis or Speech Recognition Only.
Go to the project, take note of the appkey, and modify the speech recognition model configuration as needed.
The Mobi-Flow platform supports only speech recognition models with an audio sampling rate of 16 kHz.
Step 2: Configure the Alibaba Cloud Intelligent Speech Interaction integration resource in Mobi-Flow
Create an Alibaba Cloud Intelligent Speech Interaction integration resource. Enter the appkey from Step 1, your Alibaba Cloud AccessKey ID, and your AccessKey Secret.
Step 3: Enable the speech-to-text feature in the Mobi-Flow application
Create a Mobi-Flow application.
Create a chat widget.
Create a speech-to-text extension and attach the Alibaba Cloud Intelligent Speech Interaction integration resource created in Step 2.
In the input area configuration of the chat widget, enable speech input and attach the speech-to-text extension.
Click the microphone icon to the right of the input box to start recording. The speech is transcribed to text in real time.