georgepar / kaldi-grpc-server

Deploy Kaldi models using grpc for bidirectional streaming.
Apache License 2.0
17 stars 6 forks source link

Non-streaming transcription throws exception: 'Queue' object has no attribute 'round_robin' #8

Closed xtsoukala closed 2 years ago

xtsoukala commented 2 years ago

Running kaldigrpc-transcribe without the --streaming flag throws the following exception:

  File "/home/ctsoukala/.local/lib/python3.8/site-packages/kaldigrpc_client/client.py", line 102, in recognize_wav
    res = self.recognize(AudioSegment.from_file(wav_file).raw_data)
  File "/home/ctsoukala/.local/lib/python3.8/site-packages/kaldigrpc_client/client.py", line 74, in recognize
    return self.connection.Recognize(req)
  File "/usr/local/lib/python3.8/dist-packages/grpc/_channel.py", line 946, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/usr/local/lib/python3.8/dist-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
    status = StatusCode.UNKNOWN
    details = "Exception calling application: 'Queue' object has no attribute 'round_robin'"
    debug_error_string = "{"created":"@1646843673.146728338","description":"Error received from peer ipv6:[::1]:18048","file":"src/core/lib/surface/call.cc","file_line":1063,"grpc_message":"Exception calling application: 'Queue' object has no attribute 'round_robin'","grpc_status":2}"

The server didn't output a relevant error, it only showed:

{'user-agent': 'grpc-python/1.42.0 grpc-c/20.0.0 (linux; chttp2)', 'accept-encoding': 'identity,gzip'}
encoding: LINEAR_PCM
sample_rate_hertz: 16000
language_code: "el-GR"
max_alternatives: 1
audio_channel_count: 1
model: "generic"
georgepar commented 2 years ago

Fix no streaming decoding

georgepar commented 2 years ago

Fixed: https://github.com/georgepar/kaldi-grpc-server/commit/497ac622ce5a892eac69dfd682e1770b834f8c74