From 129cfcd9f283dea0d64f2e20b77662febc2d802c Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期四, 23 三月 2023 10:01:32 +0800
Subject: [PATCH] cer tool

---
 funasr/runtime/python/utils/infer.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/funasr/runtime/python/utils/infer.py b/funasr/runtime/python/utils/infer.py
index f44a884..f5b2233 100644
--- a/funasr/runtime/python/utils/infer.py
+++ b/funasr/runtime/python/utils/infer.py
@@ -37,8 +37,8 @@
 for i, wav_path_i in enumerate(wav_files):
 	wav_name, wav_path = wav_path_i.strip().split()
 	result = model(wav_path)
-	text_i = "{} {}\n".format(wav_name, result[0])
-	token_i = "{} {}\n".format(wav_name, result[1])
+	text_i = "{} {}\n".format(wav_name, result[0]['preds'][0])
+	token_i = "{} {}\n".format(wav_name, result[0]['preds'][1])
 	text_f.write(text_i)
 	text_f.flush()
 	token_f.write(token_i)

--
Gitblit v1.9.1