validateVoiceprintVoiceUserText(params: ValidateVoiceprintVoiceUserTextParams)

Requires:
@tuya-miniapp/cloud-api≥1.x.x

Description

Validate whether the ASR text entered by the voice user matches the sample script.

Parameters

ParameterTypeRequiredDescription
YesRequest parameters

Return Value

Type: Promise<boolean>
ValidateVoiceprintVoiceUserTextResult (for field meanings, see the type definition and minituya response parameters)

Examples

Request example

import { validateVoiceprintVoiceUserText } from '@tuya-miniapp/cloud-api';

const params = {
  asrText: 'The weather is great today',
  exampleText: 'The weather is great today',
};

validateVoiceprintVoiceUserText(params)
  .then(result => {
    console.log('Validation result:', result);
  })
  .catch(error => {
    console.error('Failed to validate ASR text:', error);
  });

Response example

true