For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Status
OverviewProductsManageAPI ReferenceTutorialsClient Libraries
OverviewProductsManageAPI ReferenceTutorialsClient Libraries
    • Overview
  • Quickstarts
    • Synthesize Your First Clip
    • Prompted Synthesis
  • Voice Creation
      • Getting Started
      • Node.js Example
      • Python Example
    • Voice Design Guide
  • WebSocket Streaming
    • Getting Started
    • Receiving Audio Data
    • Python Example
    • Error Handling
  • Prompt Engineering
    • Voice Design Prompting
    • SSML Prompts
Status
LogoLogo
On this page
  • Prerequisites
  • 1. Initialize the project
  • 2. Configure the SDK
  • 3. Create the voice
  • 4. Run the script
Voice CreationFrom Dataset

Node.js Workflow

Was this page helpful?
Previous

Python Workflow

Next
Built with

Prerequisites

  • Resemble account with PRO plan or higher
  • API token (see Authentication)

1. Initialize the project

$npm init -y
$npm install @resemble/node

2. Configure the SDK

1// resemble-clone-voice/index.js
2import * as Resemble from "@resemble/node";
3
4const apiKey = process.env.RESEMBLE_API_KEY;
5
6if (!apiKey) {
7 console.error("Please set the RESEMBLE_API_KEY environment variable.");
8 process.exit(1);
9}
10
11Resemble.Resemble.setApiKey(apiKey);

3. Create the voice

1async function createVoice() {
2 const voiceName = "My Voice Clone";
3 const dataset = "https://example.com/dataset.zip"; // Replace with your dataset URL
4
5 console.log(`Submitting request to create voice: ${voiceName}`);
6
7 try {
8 const response = await Resemble.Resemble.v2.voices.create({
9 name: voiceName,
10 dataset_url: dataset,
11 });
12
13 if (response.success) {
14 const voice = response.item;
15 console.log(
16 `Created voice ${voice.uuid}. Current status: ${voice.status}`
17 );
18 } else {
19 console.error("Voice creation failed", response);
20 }
21 } catch (error) {
22 console.error("Error creating voice:", error);
23 }
24}
25
26createVoice();

Datasets must be publicly accessible and follow Resemble’s supported formats. Verify reachability with:

$curl -I https://url/to/your/dataset.zip

4. Run the script

$RESEMBLE_API_KEY=... node index.js

You’ll receive a response indicating the new voice UUID and the current training status (e.g., initializing). Monitor progress via the API or the Voices dashboard.

For a recordings-based workflow, see the custom voice with recordings guide.