FAQs
Why Are There Image Resources in the Intelligent Interaction SDK Installation Package?
The dynamic effect and background of intelligent interaction can be better displayed when there are image resources in the intelligent interaction SDK installation package. As a result, to facilitate integration and use, the intelligent interaction web SDK also contains UI-related resources.
What Are the Differences Between the Streaming Response of speechRecognized and That of semanticRecognized?
Differences:
- The streaming response of speechRecognized is overwritten. The value of text in the second notification contains the content of the first notification. For example, if the value of text in the first notification is "How do" and "you do?" is recognized in the second notification, the value of text in the second notification is "How do you do?"
- The streaming response of semanticRecognized is segmented. The value of text in the second notification must be combined with the content of the first notification. For example, if the value of text in the first notification is "How do" and "you do?" is returned in the second notification, the value of text in the second notification is "How do you do?" The values of text in the two notifications must be combined to make sense.
Usage of Text Q&A
By default, intelligent interaction uses speech Q&A. To use text Q&A, you need to switch the interaction mode in either of the following ways:
- Set the interaction mode to text Q&A when using the API startChat to start a dialog:
const { result } = await HwICSUiSdk.startChat({ interactionMode: 'TEXT' });
- Switch the interaction mode to text Q&A during a dialog by calling the API interactionModeSwitch. This method is applicable when the API startChat has been called and speech Q&A is in use:
const { result } = await HwICSUiSdk.interactionModeSwitch({ interactionMode: 'TEXT' });
After switching the mode, you can call the API sendTextQuestion to perform text Q&A.
What Are the Differences Between Text Q&A and Script Reading by Virtual Avatars?
A virtual avatar can read script and perform text Q&A for intelligent interaction. Virtual avatars speak as instructed by the input text.
Differences:
- Script reading: A virtual avatar reads the text input through the API sendDrivenText.
- Text Q&A: A question in text is input through the API sendTextQuestion and the answer is given by the equipped large model of the virtual avatar. The virtual avatar reads the answer instead of the question.
Why Do I Need to Customize a Voice Wakeup Model?
A custom wakeup model based on wakeup phrases can improve the accuracy of wakeup phrases.
Can I Change a Wakeup Phrase Locally?
No, because a model is bound to certain wakeup phrases.
When a Web Page Integrated with the Web SDK Was Loaded, the API create Was Automatically Called to Create a Virtual Avatar. Why Was the Script Reading by This Avatar Muted?
You can locate the cause by referring to Autoplay Guide for Media and Web Audio APIs. Then troubleshoot with the following steps:
- Click the button of adding to trigger the API create and check whether it is muted. If no, the problem is caused by the security policy of the browser. In this case, users need to click the page before calling create.
- Check whether the speaker is working properly.
- If the speaker has been added or deleted, refresh or re-open the virtual avatar page and try again. If the fault persists, repeat step 2.
What Are the Statuses of a Chatting Virtual Avatar?
Virtual avatars can be in any of the following statuses when chatting:
- Sleeping: received the notification enterSleep
- Recognition pending: received the notification enterActive
- Recognizing: received the notification speechRecognized
- Thinking: received the notification speechRecognized, in which isLast is set to true
- Answering: received the notification semanticRecognized for the first time
- Answered: received the notification speakingStop
The preceding statuses are only examples provided by the SDK. You can customize the statuses as needed.
What If the Preset Buttons and Fonts Displayed by the Web SDK Are Larger Than Those on the Demonstration Page?
The CSS style of the web SDK is optimized based on 1920 x 1080 (PCs) and 1080 x 1920 (mobile devices and large screens). The width and height in the CSS file are expressed in px. As a result, the preset fonts and buttons of the SDK are displayed disproportionately and look large on devices with small screens, such as mobile devices. Here are the solutions:
- Do not use components such as the preset button and chat list of the SDK. Instead, develop an operation UI using the APIs and notifications provided by the SDK.
- Alternatively, use a plugin similar to px2rem in the compilation tool to convert PX in the CSS file of the SDK to REM. Adjust the relative size of the font and button by controlling font-size on the root node.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot