Skip to content

docs: iterate audio chunks in text-to-speech snippets - #749

Merged
GregHolmes merged 1 commit into
deepgram:mainfrom
AlvaroBalbin:issue-638-docs-attributeerror-generator-objec
Sep 1, 2026
Merged

docs: iterate audio chunks in text-to-speech snippets#749
GregHolmes merged 1 commit into
deepgram:mainfrom
AlvaroBalbin:issue-638-docs-attributeerror-generator-objec

Conversation

@AlvaroBalbin

Copy link
Copy Markdown
Contributor

The text-to-speech snippet in the README called response.stream.getvalue(), but client.speak.v1.audio.generate() returns an Iterator[bytes], so running it as written raises AttributeError: 'generator' object has no attribute 'stream'. I changed the snippet to iterate the response and write each chunk, and applied the same correction to the identical snippet in the v3 to v5 migration guide. Fixes #638.

I pushed this to my fork first and the project's own CI workflows pass on the commit.

@GregHolmes
GregHolmes merged commit 178724e into deepgram:main Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: AttributeError: 'generator' object has no attribute 'stream' in readme snippet

2 participants