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,
)
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!