提交 2a455fa6 编写于 作者: H Hui Zhang

fix rtf bug

上级 d95b0cd9
......@@ -33,8 +33,9 @@ if __name__ == '__main__':
P = 0.0
n = 0
for m in rtfs:
# not accurate, may have duplicate log
n += 1
T += m['T']
P += m['P']
print(f"RTF: {P/T}, utts: {n}")
print(f"RTF: {P/T}")
......@@ -18,7 +18,6 @@
import argparse
import asyncio
import codecs
import logging
import os
from paddlespeech.cli.log import logger
......@@ -44,7 +43,7 @@ def main(args):
# support to process batch audios from wav.scp
if args.wavscp and os.path.exists(args.wavscp):
logging.info(f"start to process the wavscp: {args.wavscp}")
logger.info(f"start to process the wavscp: {args.wavscp}")
with codecs.open(args.wavscp, 'r', encoding='utf-8') as f,\
codecs.open("result.txt", 'w', encoding='utf-8') as w:
for line in f:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册