From dcb92f13eddbf3032ce363b35f13f80afa8f94d1 Mon Sep 17 00:00:00 2001
From: haoneng.lhn <haoneng.lhn@alibaba-inc.com>
Date: 星期四, 14 九月 2023 16:46:30 +0800
Subject: [PATCH] add paraformer online opt infer code
---
funasr/bin/asr_infer.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/funasr/bin/asr_infer.py b/funasr/bin/asr_infer.py
index 7746821..3d72ec4 100644
--- a/funasr/bin/asr_infer.py
+++ b/funasr/bin/asr_infer.py
@@ -430,7 +430,7 @@
# b. Forward Encoder
if decoding_ind is None:
- decoding_ind = self.decoding_ind
+ decoding_ind = 0 if self.decoding_ind is None else self.decoding_ind
enc, enc_len = self.asr_model.encode(**batch, ind=decoding_ind)
if isinstance(enc, tuple):
enc = enc[0]
--
Gitblit v1.9.1