deepgram / deepgram-python-sdk

Official Python SDK for Deepgram's automated speech recognition APIs.
https://developers.deepgram.com
MIT License
179 stars 48 forks source link

Fix Exception Handling When Platform Sends Close (From Timeout) #306

Closed dvonthenen closed 4 months ago

dvonthenen commented 4 months ago

Proposed changes

This should address issue https://github.com/deepgram/deepgram-python-sdk/pull/305

Changes include:

Tested with examples/streaming and also while receiving a timeout.

Types of changes

What types of changes does your code introduce to the community Python SDK? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

NA

dvonthenen commented 4 months ago

This removes any unhandled exceptions from making it to the user... preserves the exception through an option in case someone is using that as a means of doing something higher up.