elevenlabs-python icon indicating copy to clipboard operation
elevenlabs-python copied to clipboard

Dubbing: Using CSV file in auto mode

Open mohsiniscoding opened this issue 2 years ago • 1 comments

I want to use custom translation for dubbing audios, but in auto mode, the code works but it seems to be ignoring CSV file and generating it's own translation. Any help would be appreciated!

# Retrieve the API key
ELEVENLABS_API_KEY = os.getenv("ELEVENLABS_API_KEY")
if not ELEVENLABS_API_KEY:
    raise ValueError(
        "ELEVENLABS_API_KEY environment variable not found. "
        "Please set the API key in your environment variables."
    )

client = ElevenLabs(api_key=ELEVENLABS_API_KEY)

## main source file
source_file = open("input_v3_2min.wav", "rb")
csv_file = open("input_v3_2min.csv", "rb")

result = client.dubbing.dub_a_video_or_an_audio_file(
    mode="auto",
    source_lang="en",
    target_lang="es",
    csv_file=csv_file,
    file=source_file,
    foreground_audio_file=source_file,
    name="output 2 min",
    num_speakers=10,
)

mohsiniscoding avatar Aug 12 '24 15:08 mohsiniscoding

hey, we don't currently support csv files anymore so i will close this issue and log it as a feature request

AngeloGiacco avatar Feb 03 '25 19:02 AngeloGiacco