alphacep / vosk-server

WebSocket, gRPC and WebRTC speech recognition server based on Vosk and Kaldi libraries
Apache License 2.0
918 stars 248 forks source link

asynccontextmanager #76

Closed mister511 closed 2 years ago

mister511 commented 3 years ago

[root@Kaldi websocket]# ./test_microphone.py localhost:2700 Traceback (most recent call last): File "./test_microphone.py", line 7, in from contextlib import asynccontextmanager, contextmanager, AsyncExitStack ImportError: cannot import name 'asynccontextmanager'

[root@Kaldi websocket]# pip3 install asyncio-contextmanager WARNING: Running pip install with root privileges is generally not a good idea. Try pip3 install --user instead. Requirement already satisfied: asyncio-contextmanager in /usr/local/lib/python3.6/site-packages

what could be the problem?

nshmyrev commented 3 years ago

As in https://github.com/mosquito/aio-pika/issues/188 this feature was added in python 3.6.5, most likely you have older one.

Try to upgrade python.

mister511 commented 3 years ago

[root@Kaldi asterisk-16.14.0]# python3 -V Python 3.6.8

hc038 commented 3 years ago

@mister511 did you solve the problem? I am having the same problem now

88fingerslukee commented 3 years ago

I'm also having this problem. help!

nshmyrev commented 3 years ago

I'm also having this problem. help!

What is your distribution and python version.

88fingerslukee commented 3 years ago

I messed up and tried test_microphon.py from the root of the server and not from inside the docker container. It's all sorted now.

nshmyrev commented 2 years ago

We moved to sounddevice, no need for contextmanager anymore