getCloneTimbreConfig(params: GetCloneTimbreConfigParams)

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

Description

Get timbre cloning configuration.

Parameters

ParameterTypeRequiredDescription
YesRequest parameters

Return Value

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

Referenced Types

interfaceCloneTimbreConfigCloned voice configuration
PropertyTypeDescription
exampleTextListstring[]List of sample texts
maxCloneRecordTimeSecondsnumberMaximum voice cloning recording duration (seconds)

Examples

Request example

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

const params = {
  lang: 'zh',
};

getCloneTimbreConfig(params)
  .then(result => {
    console.log('Timbre cloning config:', result);
  })
  .catch(error => {
    console.error('Failed to get timbre cloning config:', error);
  });

Response example

{
  "maxCloneRecordTimeSeconds": 30,
  "exampleTextList": [
    "The weather is great today"
  ]
}