@deepdub/node
v1.0.1
Published
Deepdub API SDK
Downloads
195
Readme
Deepdub SDK
This is the official SDK for the Deepdub API. It provides a simple way to interact with the API and generate dubbing scripts for your videos.
Install
npm install --save @deepdub/node
# or
yarn add @deepdub/node
Usage
const { DeepdubClient } = require('@deepdub/node');
require('dotenv').config();
async function main() {
const deepdub = new DeepdubClient('YOUR_API_KEY');
const promptId = 'YOUR_PROMPT_ID';
await deepdub.connect();
// You can generate into a buffer:
//
const buffer = await deepdub.generateToBuffer('Hello, this is a test.', 'en-US', promptId);
// Or you can generate into a file:
//
await deepdub.generateToFile('./generated.wav', 'Hello, this is a test.', 'en-US', promptId);
}
main();