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

response json format problems with streaming stt #6

Open
emphasize opened this issue Apr 21, 2023 · 2 comments
Open

response json format problems with streaming stt #6

emphasize opened this issue Apr 21, 2023 · 2 comments

Comments

@emphasize
Copy link
Member

endpoint https://stt.openvoiceos.com/stt

 Exception in thread Thread-6:
Apr 21 21:54:48 ovos ovos-systemd-voice[832]: Traceback (most recent call last):
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:   File "/usr/local/lib/python3.9/dist-packages/requests/models.py", line 971, in json
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:     return complexjson.loads(self.text, **kwargs)
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:   File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:     return _default_decoder.decode(s)
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:   File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:   File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:     raise JSONDecodeError("Expecting value", s, err.value) from None
Apr 21 21:54:48 ovos ovos-systemd-voice[832]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Apr 21 21:54:48 ovos ovos-systemd-voice[832]: During handling of the above exception, another exception occurred:
Apr 21 21:54:48 ovos ovos-systemd-voice[832]: Traceback (most recent call last):
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:   File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:     self.run()
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:   File "/usr/local/lib/python3.9/dist-packages/ovos_plugin_manager/templates/stt.py", line 167, in run
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:     return self.handle_audio_stream(self._get_data(), self.language)
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:   File "/usr/local/lib/python3.9/dist-packages/ovos_stt_plugin_server/__init__.py", line 42, in handle_audio_stream
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:     self.text = response.json()["transcript"]
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:   File "/usr/local/lib/python3.9/dist-packages/requests/models.py", line 975, in json
Apr 21 21:54:48 ovos ovos-systemd-voice[832]:     raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
Apr 21 21:54:48 ovos ovos-systemd-voice[832]: requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
@builderjer
Copy link
Member

we removed this server from the public servers, can this issue be closed?

@mikejgray
Copy link

Some defensive error handling might be good for future scenarios

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

3 participants