From 1476b19e0539e6686dd0180ef109b38cf12fb4b0 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Mon, 2 Oct 2023 19:33:56 -0700 Subject: [PATCH] Fix `get_stt` timing context handling --- neon_speech/service.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neon_speech/service.py b/neon_speech/service.py index 3779af5..44ce694 100644 --- a/neon_speech/service.py +++ b/neon_speech/service.py @@ -378,10 +378,9 @@ def build_context(msg: Message): with self._stopwatch: _, parser_data, transcriptions = \ self._get_stt_from_file(wav_file_path, lang) - message.context.setdefault('timing', dict()) - message.context['timing']['get_stt'] = self._stopwatch.time message.context["audio_parser_data"] = parser_data context = build_context(message) + context['timing']['get_stt'] = self._stopwatch.time data = { "utterances": transcriptions, "lang": message.data.get("lang", "en-us")