Comments (8)
That's actually a 100% intentional.
Please see:
#302
In case that issue isn't clear, on certain platforms, the pip install deepgram-sdk
will fail if portaudio isn't installed. That would force people with a hard requirement to install portaudio just to use the SDK when they might not be interested in any of the examples that use it.
All the examples that use the Microphone have documentation in the README.md to install (like brew install portaudio
or whatever it is for your platform) before running.
from deepgram-python-sdk.
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 Microphone
class is parsed by Python, which is done as soon as import deepgram
is done.
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.
from deepgram-python-sdk.
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.
from deepgram-python-sdk.
Yep, exactly. See #419.
from deepgram-python-sdk.
I think TYPE_CHECKING
was introduced a little later in v3. I will need to see if this works for the supported versions of of the SDK.
from deepgram-python-sdk.
@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.
from deepgram-python-sdk.
As mentioned here, typing.TYPING_CHECKING
was added in Python 3.5.2 according to the documentation, so I don't see why it shouldn't work.
from deepgram-python-sdk.
@Tenzer thanks again for the PR. just posted a new release with this fix:
https://github.com/deepgram/deepgram-python-sdk/releases/tag/v3.3.1
from deepgram-python-sdk.
Related Issues (20)
- Inconsistency latency in real time STT with nova-2-phonecall HOT 4
- WebSocketException in LiveClient.start: timed out Failed to connect to Deepgram
- SpeechStarted gets triggered by background noise HOT 1
- WebSocketException in LiveClient.start: timed out Failed to connect to Deepgram HOT 4
- Rename "OnPrem" to "SelfHosted' HOT 1
- Issue with Prerecorded Local File Transcription on Vercel HOT 5
- Add Documentation for A Contributor Workflow HOT 1
- Add More Instrumentation for Thread Audit HOT 1
- Wait for Tasks in `_emit` Before Moving On HOT 1
- Implement Grouping of Client Logs
- Speak TTS WS
- Introduce v1.1 for Speak Clients (REST + WS) HOT 1
- Refactor Similar Code in REST and WS Clients HOT 1
- httpcore.ReadTimeout: The read operation timed out HOT 3
- Microphone Package/Library Isn't Supported on Windows HOT 5
- websocket send function is not processing subsequent messages HOT 12
- `endpointing` attribute in `LiveOptions` should be a union integer and a generic false. HOT 1
- Missing `dictation` setting from streaming audio (live) `LiveOptions`
- Improved API Reference HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepgram-python-sdk.