You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use websocket for Automatic Speech Recognition (ASR) server side. I try to load models in __init__. After the models loaded successfully,the following exception thrown out:
Selected GPU[0] GeForce GTX 1060 6GB as the process wide default device.
ASR model loaded successfully
(('127.0.01', 56236), 'connected')
Traceback (most recent call last):
File "websocket_server2.py", line 111, in
server.serveforever()
File "/home/aj/anaconda3/envs/cntk-py27/lib/python2.7/site-packages/SimpleWebSocketServer/SimpleWebSocketServer.py", line 677, in serveforever
self.serveonce()
File "/home/aj/anaconda3/envs/cntk-py27/lib/python2.7/site-packages/SimpleWebSocketServer/SimpleWebSocketServer.py", line 618, in serveonce
rList, wList, xList = select(self.listeners, writers, self.listeners, self.selectInterval)
select.error: (4, 'Interrupted system call')
My class defined as bellow:
# -*- coding: utf-8 -*-
from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket
from ASR import ASR
class SimpleEcho(WebSocket):
def __init__(self, server, sock, address):
super(SimpleEcho, self).__init__(server, sock, address)
self.asr = ASR()
def handleMessage(self):
data = np.frombuffer(self.data, 'i2')
result = self.asr(data)
self.sendMessage(unicode(result))
def handleConnected(self):
print(self.address, 'connected')
self.sendMessage(unicode('connection stablished...'))
def handleClose(self):
print(self.address, 'connection closed')
self.sendMessage(unicode('connection closed...'))
server = SimpleWebSocketServer('0.0.0.0', 8081, SimpleEcho)
server.serveforever()
What cause such exception and how can I avoid it?
regards.
The text was updated successfully, but these errors were encountered:
Hi
I want to use websocket for Automatic Speech Recognition (ASR) server side. I try to load models in
__init__
. After the models loaded successfully,the following exception thrown out:My class defined as bellow:
What cause such exception and how can I avoid it?
regards.
The text was updated successfully, but these errors were encountered: