Skip to content

text_to_speech.convert of AsyncElevenLabs returns unexpected type which cannot be awaited #708

@legit-programmer

Description

@legit-programmer

To reproduce:

client = AsyncElevenLabs(
  api_key=os.getenv("ELEVENLABS_API_KEY"),
)


async def main() -> None:
    await client.text_to_speech.convert(
        voice_id="rAsfH6d68tmh0XRGXp4D",
        output_format="mp3_44100_128",
        text="The first move is what sets everything in motion.",
        model_id="eleven_multilingual_v2",
    )


asyncio.run(main())

Error on console:
TypeError: object async_generator can't be used in 'await' expression

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions