elevenlabs / elevenlabs-python

The official Python API for ElevenLabs Text to Speech.
https://elevenlabs.io/docs/api-reference/getting-started
MIT License
2.22k stars 258 forks source link

Release 1.10.0: dubbing.dub_a_video_or_an_audio_file AttributeError: 'ellipsis' object has no attribute 'read' #386

Open brianshin22 opened 1 month ago

brianshin22 commented 1 month ago

Description

dubbing api call results in error in release 1.10.0

Steps to reproduce python 3.10

  1. pip install elevenlabs==1.10.0
  2. Create elevenlabs client, call client.dubbing.dub_a_video_or_an_audio_file(source_url, target_lang, ...)
  3. Result: AttributeError: 'ellipsis' object has no attribute 'read'

httpx -> _multipart.py --> [181] chunk = self.file.read(self.CHUNK_SIZE) [182] while chunk: [183] yield to_bytes(chunk)

Code example

from elevenlabs import ElevenLabs

...

client = ElevenLabs(
    ...
)

source_url = "https://www.youtube.com/watch?v=v4t0E3S1N1k"
source_language = "en"
target_language = "es"

response = client.dubbing.dub_a_video_or_an_audio_file(
        source_url=source_url,
        target_lang=target_language,
        source_lang=source_language,
        num_speakers=1,
        watermark=True,  # reduces the characters used
)
dubbing_id = response.dubbing_id
print(dubbing_id)

Additional context

Current workaround: revert to 1.9.0 Have not looked into the source of the error, but have verified that reverting to previous release (1.9.0) fixes the error. Could be incompatibility with httpx module (0.23.3 installed)