deepgram-python-sdk
deepgram-python-sdk copied to clipboard
docs: iterate audio chunks in text-to-speech snippets
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.