-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3.3.0 needs pyaudio but doesn't specify it as a dependency #418
Comments
That's actually a 100% intentional. Please see: In case that issue isn't clear, on certain platforms, the All the examples that use the Microphone have documentation in the README.md to install (like |
This wasn't a problem in version 3.2.7 which is why I am reporting it. The problem seems to stem from the import which is done at the class-level here:
It attempts to import pyaudio as soon as the Since that import is only used for type checking, it can instead be put in a conditional, so this isn't a problem. I'll make a PR in a moment to demonstrate. |
ooooh you are reportng that it is giving you the error. now I see what you are saying. If you want to do the PR to remove the line, that would be awesome. Otherwise, I can. |
Yep, exactly. See #419. |
I think |
@Tenzer would you happen to know if this works for 3.10? and I have been working on a side project on getting the SDK to work on 3.9 (because some have been complaining about this) but I haven't been able to devote a ton of time to it. |
As mentioned here, |
@Tenzer thanks again for the PR. just posted a new release with this fix: |
What is the current behavior?
Installing v3.3.0 of this library and trying to
import deepgram
gives a stack trace because deepgram-sdk depends on pyaudio, but it isn't installed as a dependency.Steps to reproduce
python3 -m venv venv
venv/bin/pip install deepgram-sdk==3.3.0
venv/bin/python -c 'import deepgram'
It gives a stack trace like this:
Expected behavior
It should be possible to install the library and import it without having to install extra dependencies manually.
Please tell us about your environment
This happens regardless of operating system. I have only tested on Python 3.12.
Other information
The text was updated successfully, but these errors were encountered: