Streaming from microphone help #592
Replies: 8 comments 4 replies
-
Thanks for asking your question about Deepgram! If you didn't already include it in your post, please be sure to add as much detail as possible so we can assist you efficiently, such as:
|
Beta Was this translation helpful? Give feedback.
-
Hi @S2741940 You need to install the |
Beta Was this translation helpful? Give feedback.
-
Yea, we don't support Python 3.9. The minimum version is 3.10. Linux isn't able to find the library based on the error message here:
After installing, did you reboot your OS (or ldconfig the system)? |
Beta Was this translation helpful? Give feedback.
-
There is a PyAudio==0.2.14 you might want to update to. Also want to make sure you are using Python from like brew and not using some apple version of it. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your help and patience! I've tried the above and still no luck unfortunately. I am able to navigate to the _portaudio.cpython-312-darwin.so file so it does exist. Here are my steps attempting to do the basic test in Python 3.10 (Mac OSX 12.3): MAKE NEW ENVIRONMENT: ENTER ENVIRONEMNT: INSTALL PORT AUDIO INSTALL REQUIREMENTS: UPDATE PIP UPDATE PYAUDIO RESTART COMPUTER ENTER ENVIRONEMNT: RUN SCRIPT I receive this error: I've tried installing and reinstalling portaudio and pyaudio a bunch of times, and also installing port audio from the website download and performing the ./configure && make command. I can run the python3.9 test_suite.py -k [API KEY} command in the same environment with 3.9 installed and it works, just doesn't work at all in 3.10. After this I have the following pip list: aiohttp 3.7.4.post0 Any ideas would be great, all good if I'm just beyond help! Thank you |
Beta Was this translation helpful? Give feedback.
-
I should have asked this upfront initially, but do you have Rosetta installed? |
Beta Was this translation helpful? Give feedback.
-
Yes, Rosetta is installed.
On 10 Feb 2024, at 1:59 am, David vonThenen ***@***.***> wrote:
I should have asked this upfront initially, but do you have Rosetta installed?
—
Reply to this email directly, view it on GitHub<#592 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BGAFFTWCYEJ266XKWBLZ723YSZBW3AVCNFSM6AAAAABC7B2OZWVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DIMRQGY3DI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I am looking back at your posts and there seem to be a bunch of inconsistencies regarding the the environment. You are using |
Beta Was this translation helpful? Give feedback.
-
I'm working through the Live Streaming Starter Kit, and am encountering an error when running the command: python3.9 test_suite.py -k YOUR_DEEPGRAM_API_KEY -i mic
ERROR
ℹ️ Request ID: 0781a4ed-5353-436b-ac55-a7927e0a8311
ℹ️ Model: general
🟢 (1/5) Successfully opened Deepgram streaming connection
🟢 (2/5) Ready to stream mic audio to Deepgram. Speak into your microphone to transcribe.
Error while sending: Task <Task pending name='Task-5' coro=<run..sender() running at ~/test_suite.py:101> cb=[_gather.._done_callback() at /usr/local/Cellar/[email protected]/3.9.18_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/tasks.py:767]> got Future attached to a different loop
🔴 ERROR: Something went wrong! Task <Task pending name='Task-5' coro=<run..sender() running at ~/test_suite.py:101> cb=[_gather.._done_callback() at /usr/local/Cellar/[email protected]/3.9.18_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/tasks.py:767]> got Future attached to a different loop
Mac OS12.3 with Mac Studio M1 Max
I've read that there can be issues with Python versions. When I try to run the same in a Python3.10 or 3.12 environment, I get:
Could not import the PyAudio C module 'pyaudio._portaudio'.
Traceback (most recent call last):
File "~/test_suite.py", line 1, in
import pyaudio
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pyaudio/init.py", line 111, in
import pyaudio._portaudio as pa
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pyaudio/_portaudio.cpython-312-darwin.so, 0x0002): symbol not found in flat namespace '_PaMacCore_SetupChannelMap'
I am able to successfully run the 'stream a file' and 'stream my own WAV' commands when using Python3.9.
Any help would be much appreciated, thanks!
For my 3.9 environment:
Package Version
aiohttp 3.9.3
aiosignal 1.3.1
anyio 4.2.0
async-timeout 4.0.3
attrs 23.2.0
certifi 2024.2.2
chardet 4.0.0
dataclasses-json 0.6.4
deepgram-sdk 3.1.3
exceptiongroup 1.2.0
frozenlist 1.4.1
h11 0.14.0
httpcore 1.0.2
httpx 0.26.0
idna 3.6
marshmallow 3.20.2
multidict 6.0.5
mypy-extensions 1.0.0
packaging 23.2
pip 24.0
PyAudio 0.2.13
pydub 0.25.1
setuptools 68.2.2
sniffio 1.3.0
typing_extensions 4.9.0
typing-inspect 0.9.0
verboselogs 1.7
websockets 12.0
yarl 1.9.4
Beta Was this translation helpful? Give feedback.
All reactions