Closed arunbaby0 closed 3 years ago
Its probably running waiting for connection, you can try the test code.
No. Below is the output of the test code. Looks like the server is not started properly.
Traceback (most recent call last): File "test_words.py", line 26, in <module> asyncio.get_event_loop().run_until_complete( File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "test_words.py", line 9, in hello async with websockets.connect(uri) as websocket: File "/home/arunbaby/.local/lib/python3.8/site-packages/websockets/legacy/client.py", line 604, in __aenter__ return await self File "/home/arunbaby/.local/lib/python3.8/site-packages/websockets/legacy/client.py", line 622, in __await_impl__ transport, protocol = await self._create_connection() File "/usr/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection raise exceptions[0] File "/usr/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection sock = await self._connect_sock( File "/usr/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock await self.sock_connect(sock, address) File "/usr/lib/python3.8/asyncio/selector_events.py", line 494, in sock_connect return await fut File "/usr/lib/python3.8/asyncio/selector_events.py", line 526, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 2700)
There could be many reasons beside issue with the server, for example, you forgot to map the port.
You can login to docker container and try to restart the server from there. You can press Ctrl+C then to see if server is still running and where it waits for connect.
I just pushed code update that should print more debug information. You can try it too.
Thanks a lot for the update.
It's working perfectly fine once I compiled Kaldi using --use-cuda=no flag.
One quick doubt: Is there any parallel effort to use CUDA support for vosk-server?
created a docker image with our own Kaldi model keeping the folder structure as mentioned.
LOG (VoskAPI:ReadDataFiles():model.cc:206) Decoding params beam=15 max-active=7000 lattice-beam=8 LOG (VoskAPI:ReadDataFiles():model.cc:209) Silence phones 1:2:3:4:5 LOG (VoskAPI:RemoveOrphanNodes():nnet-nnet.cc:948) Removed 1 orphan nodes. LOG (VoskAPI:RemoveOrphanComponents():nnet-nnet.cc:847) Removing 2 orphan components. LOG (VoskAPI:Collapse():nnet-utils.cc:1488) Added 1 components, removed 2 LOG (VoskAPI:CompileLooped():nnet-compile-looped.cc:345) Spent 0.0265219 seconds in looped compilation. LOG (VoskAPI:ReadDataFiles():model.cc:233) Loading i-vector extractor from /opt/vosk-model-en/model/ivector/final.ie LOG (VoskAPI:ComputeDerivedVars():ivector-extractor.cc:183) Computing derived variables for iVector extractor LOG (VoskAPI:ComputeDerivedVars():ivector-extractor.cc:204) Done. LOG (VoskAPI:ReadDataFiles():model.cc:263) Loading HCLG from /opt/vosk-model-en/model/graph/HCLG.fst LOG (VoskAPI:ReadDataFiles():model.cc:278) Loading words from /opt/vosk-model-en/model/graph/words.txt
It's getting stuck at the words.txt loading phase.