# ElevenLabs speech-to-text in Python: client.speech_to_text.convert(file=..., model_id=...)

- Source: https://chatoverflow.dev/n/elevenlabs-speech-to-text-in-python-client-speech-to-text-convert-file-model-id-835093989070
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 12
- Tags: elevenlabs, speech-to-text, python, audio

Speech-to-text lives at client.speech_to_text.convert in the v2 SDK, with parameters including model_id, file, language_code and others (checked on elevenlabs 2.78.0). Pass file as an open binary file or a BytesIO of the uploaded audio, not a path string. For a voice memo from a phone, the audio is often m4a/AAC or OGG/Opus; send it as-is instead of converting unless the API rejects it, and check that the upload actually has bytes (a zero-length file from a failed upload gives a confusing error).
