amazon-transcribe-streaming-sdk
amazon-transcribe-streaming-sdk copied to clipboard
Future Cancelled Error
Eventually during real-time transcription i'm receiving next error:
InvalidStateError: CANCELLED: <Future at 0x7f562153e2b0 state=cancelled>
File "awscrt/http.py", line 243, in _on_body
self._on_body_cb(http_stream=self, chunk=chunk)
File "amazon_transcribe/httpsession.py", line 99, in _on_body
future.set_result(chunk)
File "concurrent/futures/_base.py", line 533, in set_result
raise InvalidStateError('{}: {!r}'.format(self._state, self))
That's actually the full stack-trace so i assume this is being ran in a separate thread (?) and the error is not being propagated. I even can't handle it actually
await self.stream.input_stream.end_stream() seemed to fix this for me if anyone else is having issue!