elevenlabs/elevenlabs-js

Dubbing: Target language is not getting set.

Closed this issue · 3 comments

Hello.

I am trying to trying to use the dubbing api using this module. While using dubbing part I am getting this error everytime:

{
  "detail": {
    "status": "empty_target_language",
    "message": "Target language must be set in automatic dubbing mode. Either set the target language or set dubbing studio to true."
  }
}

This is the code I wrote to reproduce the error:

import { ElevenLabsClient } from 'elevenlabs';
import dotenv from 'dotenv';
import fs from 'fs';

dotenv.config();

const elevenlabs = new ElevenLabsClient({
  apiKey: process.env.ELEVENLABS_API_KEY,
});

const file = fs.createReadStream('test.mp4');

const res = await elevenlabs.dubbing
  .dubAVideoOrAnAudioFile({
    file,
    target_lang: 'en',
    watermark: true,
    mode: 'automatic',
  })

console.log(res);

I am running node v20.13.1

same thing happening on node v20.11.1 and "elevenlabs": "^0.6.0"

But it works through API calls,

@chandrashekhar07 this should be fixed in version 0.8.2!