createCloneTimbre(params: CreateCloneTimbreParams)

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

Description

Create a cloned timbre.

Parameters

ParameterTypeRequiredDescription
YesRequest parameters

Return Value

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

Referenced Types

interfaceCreateCloneTimbreResult
PropertyTypeDescription
cloneTimbreIdstringBusiness primary key for the cloned voice

Examples

Request example

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

const params = {
  voiceUrl: 'https://example.com/voice.mp3',
  voiceLang: 'zh',
  text: 'The weather is great today',
};

createCloneTimbre(params)
  .then(result => {
    console.log('Created timbre clone:', result);
  })
  .catch(error => {
    console.error('Failed to create timbre clone:', error);
  });

Response example

{
  "cloneTimbreId": "k1jfEt7xKu"
}