From 1ea1e31ef6cce9f2d35cc1f98bad6d52a96b870f Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 21 Feb 2026 00:00:27 -0800 Subject: [PATCH] Fix #2782: convert timestamp to int before offset addition in inference_with_vad t[0] and t[1] can be strings when coming from ASR output; adding an int VAD segment offset caused TypeError. Wrap both operands in int() to ensure arithmetic succeeds regardless of the incoming type. Co-Authored-By: Claude Sonnet 4.6 --- funasr/auto/auto_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py index 9bf1ad57e..2767e1863 100644 --- a/funasr/auto/auto_model.py +++ b/funasr/auto/auto_model.py @@ -555,8 +555,8 @@ def inference_with_vad(self, input, input_len=None, **cfg): if k not in result: result[k] = [] for t in restored_data[j][k]: - t[0] += vadsegments[j][0] - t[1] += vadsegments[j][0] + t[0] = int(t[0]) + int(vadsegments[j][0]) + t[1] = int(t[1]) + int(vadsegments[j][0]) result[k].extend(restored_data[j][k]) elif k == "spk_embedding": if k not in result: