From f5947f1059329fc57d1f1190939cda3bf17e60c0 Mon Sep 17 00:00:00 2001 From: Vadim Doroshenko Date: Mon, 24 Oct 2022 13:50:14 +0200 Subject: [PATCH 1/2] deleted unused enumerate --- python/vosk/transcriber/transcriber.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/vosk/transcriber/transcriber.py b/python/vosk/transcriber/transcriber.py index 454257fd..0c85c9d9 100644 --- a/python/vosk/transcriber/transcriber.py +++ b/python/vosk/transcriber/transcriber.py @@ -97,7 +97,7 @@ def format_result(self, result, words_per_line=7): elif self.args.output_type == "json": monologues = {"schemaVersion":"2.0", "monologues":[]} - for _, res in enumerate(result): + for res in result: if not "result" in res: continue monologue = { "speaker": {"id": "unknown", "name": None}, "start": 0, "end": 0, "terms": []} From 472f694f9998f4dbc400965e65d8f2ee7576f65f Mon Sep 17 00:00:00 2001 From: Vadim Doroshenko Date: Mon, 24 Oct 2022 14:06:25 +0200 Subject: [PATCH 2/2] deleted unsused enumerate --- python/vosk/transcriber/transcriber.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/vosk/transcriber/transcriber.py b/python/vosk/transcriber/transcriber.py index 0c85c9d9..ba77dc5a 100644 --- a/python/vosk/transcriber/transcriber.py +++ b/python/vosk/transcriber/transcriber.py @@ -76,7 +76,7 @@ def format_result(self, result, words_per_line=7): if self.args.output_type == "srt": subs = [] - for _, res in enumerate(result): + for res in result: if not "result" in res: continue words = res["result"]