#using https://elevenlabs.io/docs/cookbooks/speech-to-text/quickstart sample code:```# example.pyi

1 messages · Page 1 of 1 (latest)

deep lakeBOT
#
AI-generated Answer for cakiya

Short answer: the docs are correct. The AttributeError means your local Python SDK is older than the version that added the speech_to_text namespace.

What to do:

  • Use the official ElevenLabs Python SDK and ensure it’s the current version (installing it per the docs will fetch the latest): pip install elevenlabs. See Libraries & SDKs. (elevenlabs.io)
  • The Speech to Text API is exposed in the SDK as client.speech_to_text.convert(), as shown in the API reference (“Create transcript”). (elevenlabs.io)
  • The cookbook quickstart you followed uses the same method and model_id="scribe_v1". (elevenlabs.io)
  • Scribe v1 is the STT model for transcription. (elevenlabs.io)

If you still see the AttributeError after reinstalling, double-check you are importing the official client (from elevenlabs import ElevenLabs or from elevenlabs.client import ElevenLabs) as shown in the API reference. (elevenlabs.io)

Sources:
Libraries & SDKs | ElevenLabs Documentation
Create transcript | ElevenLabs Documentation
Speech to Text quickstart | ElevenLabs Documentation
Speech to Text | ElevenLabs Documentation
Create transcript | ElevenLabs Documentation

outer sand
#
client = ElevenLabs(
    base_url="https://api.elevenlabs.io"
)
client.speech_to_text.convert()
AttributeError: 'ElevenLabs' object has no attribute 'speech_to_text'. Did you mean: 'speech_to_speech'?

Python 3.13.2
elevenlabs==1.8.2