alumae / kaldi-gstreamer-server

Real-time full-duplex speech recognition server, based on the Kaldi toolkit and the GStreamer framwork.
BSD 2-Clause "Simplified" License
1.07k stars 341 forks source link

AttributeError: 'NoneType' object has no attribute 'binary_message #67

Open AshStuff opened 7 years ago

AshStuff commented 7 years ago
Exception in thread Thread-28:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/e/ashwinraju/kaldi_asr/asr/py-kaldi/tests/client.py", line 58, in send_data_to_ws
    self.send_data(block)
  File "/e/ashwinraju/kaldi_asr/asr/py-kaldi/tests/client.py", line 22, in rate_limited_function
    ret = func(*args,**kargs)
  File "/e/ashwinraju/kaldi_asr/asr/py-kaldi/tests/client.py", line 43, in send_data
    self.send(data, binary=True)
  File "/usr/local/lib/python2.7/dist-packages/ws4py/websocket.py", line 257, in send
    message_sender = self.stream.binary_message if binary else self.stream.text_message
AttributeError: 'NoneType' object has no attribute 'binary_message

I am calculating predictions for a list of test samples in a multiprocessing way. I am able to predict the output but still am gettting this AttributeError . Any idea to avoid this error.

alumae commented 7 years ago

Please clarify your issue. It's difficult to understand where and when this problem occurs.

Alif112 commented 6 years ago

i have tried this and got the same type of problem in decoder. and i am trying: "Using the 'onlinegmmdecodefaster' based worker"

python kaldigstserver/worker.py -u ws://localhost:8888/worker/ws/speech -c sample_english_nnet2.yaml

DEBUG 2018-01-28 12:35:12,871 Starting up worker 2018-01-28 12:35:12 - INFO: decoder2: Creating decoder using conf: {'post-processor': "perl -npe 'BEGIN {use IO::Handle; STDOUT->autoflush(1);} s/(.*)/\1./;'", 'logging': {'version': 1, 'root': {'level': 'DEBUG', 'handlers': ['console']}, 'formatters': {'simpleFormater': {'datefmt': '%Y-%m-%d %H:%M:%S', 'format': '%(asctime)s - %(levelname)7s: %(name)10s: %(message)s'}}, 'disable_existing_loggers': False, 'handlers': {'console': {'formatter': 'simpleFormater', 'class': 'logging.StreamHandler', 'level': 'DEBUG'}}}, 'use-nnet2': True, 'full-post-processor': './sample_full_post_processor.py', 'decoder': {'ivector-extraction-config': 'test/models/english/tedlium_nnet_ms_sp_online/conf/ivector_extractor.conf', 'num-nbest': 10, 'lattice-beam': 6.0, 'acoustic-scale': 0.083, 'do-endpointing': True, 'beam': 10.0, 'max-active': 10000, 'fst': 'test/models/english/tedlium_nnet_ms_sp_online/HCLG.fst', 'mfcc-config': 'test/models/english/tedlium_nnet_ms_sp_online/conf/mfcc.conf', 'use-threaded-decoder': True, 'traceback-period-in-secs': 0.25, 'model': 'test/models/english/tedlium_nnet_ms_sp_online/final.mdl', 'word-syms': 'test/models/english/tedlium_nnet_ms_sp_online/words.txt', 'endpoint-silence-phones': '1:2:3:4:5:6:7:8:9:10', 'chunk-length-in-secs': 0.25}, 'silence-timeout': 10, 'out-dir': 'tmp', 'use-vad': False} Traceback (most recent call last): File "kaldigstserver/worker.py", line 366, in main() File "kaldigstserver/worker.py", line 346, in main decoder_pipeline = DecoderPipeline2(conf) File "/media/thesis/73EF5F223191438D/kaldi-gstreamer-server/kaldigstserver/decoder2.py", line 24, in init self.create_pipeline(conf) File "/media/thesis/73EF5F223191438D/kaldi-gstreamer-server/kaldigstserver/decoder2.py", line 53, in create_pipeline self.asr.set_property("use-threaded-decoder", conf["decoder"]["use-threaded-decoder"]) AttributeError: 'NoneType' object has no attribute 'set_property'

xdr-kzh commented 5 years ago

Does anyone solves this problem?

wujsy commented 5 years ago

@Alif112 Do you have sloved this problem?

Alif112 commented 5 years ago

@wujsy its long time ago, i dont remember much, but i would like to assure u that using docker will help u a lot. And docker image was bug free.