From 02aa851a4910201f0db56960064d7e121a01002c Mon Sep 17 00:00:00 2001 From: Jong Wook Kim Date: Tue, 15 Nov 2022 16:25:11 -0800 Subject: [PATCH] fix to return only the text token ids --- whisper/transcribe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whisper/transcribe.py b/whisper/transcribe.py index 654f7b419..a4c3326ca 100644 --- a/whisper/transcribe.py +++ b/whisper/transcribe.py @@ -157,7 +157,7 @@ def add_segment( "start": start, "end": end, "text": text, - "tokens": result.tokens, + "tokens": text_tokens.tolist(), "temperature": result.temperature, "avg_logprob": result.avg_logprob, "compression_ratio": result.compression_ratio,