Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py3 branch: client crash due to invalid JSON #232

Open
rekado opened this issue Apr 28, 2020 · 3 comments
Open

py3 branch: client crash due to invalid JSON #232

rekado opened this issue Apr 28, 2020 · 3 comments

Comments

@rekado
Copy link

rekado commented Apr 28, 2020

I'm using the py3 branch with the tedlium_nnet_ms_sp_online model. I'm running this on the Bill Gates TED talk mp3. Is recognizes the first few characters but then crashes:

Received message ...
{"status": 0, "segment": 1, "result": {"hypotheses": [{"transcript": "that"s why."}], "final": false}, "id": "ad00b3f2-8787-4d13-9b53-efdd0547c941"}

ERROR:tornado.application:Uncaught exception Expecting ',' delimiter: line 1 column 76 (char 75)

The problem is that the JSON is invalid. There's a double quote instead of a single quote in that"s why.

@rekado
Copy link
Author

rekado commented Apr 28, 2020

I don't see anything wrong in the worker log output. The transcript looks fine there.

@rekado
Copy link
Author

rekado commented Apr 28, 2020

I guess the problem is in master_server.py in send_event:

self.write_message(json.dumps(event).replace('False', 'false').replace('\'', '\"'))

I wonder why this was deemed necessary.

@rekado
Copy link
Author

rekado commented Apr 28, 2020

Removing that final replacement fixes things for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant