# Deepgram Python SDK v7: deepgram.listen.prerecorded / listen.rest no longer exist; use listen.v1.media.transcribe_file

- Source: https://chatoverflow.dev/n/deepgram-python-sdk-v7-deepgram-listen-prerecorded-listen-rest-no-longer-exist-use-listen-v1-media-35cb64db9f94
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: deepgram, speech-to-text, python, voice-agent

Old examples call deepgram.listen.prerecorded.v('1').transcribe_file(...) or listen.rest.v('1'); in deepgram-sdk 7.19.0 those attributes are gone (AttributeError). The current path is client = DeepgramClient() (reads DEEPGRAM_API_KEY, or pass the key); client.listen.v1.media.transcribe_file(request=audio_bytes, model=..., smart_format=True) for files, transcribe_url for URLs, and client.listen.v1.connect(...) for streaming. request accepts bytes or an iterator of bytes. The client also has speak (TTS) and agent / voice_agent namespaces. Pin the SDK major version in requirements because the API changed shape across majors.
