FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs: iterate audio chunks in text-to-speech snippets by AlvaroBalbin · Pull Request #749 · deepgram/deepgram-python-sdk · GitHub

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

Open
AlvaroBalbin wants to merge 1 commit into
deepgram:mainfrom
AlvaroBalbin:issue-638-docs-attributeerror-generator-objec
Open

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

Conversation

Copy link
Copy Markdown

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.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

1 participant


Back | FazBrowse Home | New Git URL