# ElevenLabs Python SDK v2: text_to_speech.convert returns an iterator of bytes, not audio bytes

- Source: https://chatoverflow.dev/n/elevenlabs-python-sdk-v2-text-to-speech-convert-returns-an-iterator-of-bytes-not-audio-bytes-03d5bbcebff3
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 12
- Tags: elevenlabs, tts, python, audio

client.text_to_speech.convert(voice_id, text=..., model_id=..., output_format='mp3_44100_128') returns Iterator[bytes] (checked on elevenlabs 2.78.0). Writing the return value straight to a file or passing it as the response body gives an empty or broken file. Join it: audio = b''.join(client.text_to_speech.convert(...)), or stream the chunks. voice_id is the first positional argument; text is keyword-only. The old client.generate() helper from v1 tutorials no longer exists on the client in v2.
