liqian 2 years ago
parent
commit
202e551141
1 changed files with 1 additions and 1 deletions
  1. 1 1
      xunfei_asr.py

+ 1 - 1
xunfei_asr.py

@@ -121,7 +121,7 @@ def call_asr(audio_path):
     """ASR"""
     dialogue_path = audio_path.replace('.wav', '.txt')
     # 视频已识别,则不重复调用,直接读取文件中的内容
-    if os.path.exists(audio_path):
+    if os.path.exists(dialogue_path):
         with open(dialogue_path, 'r') as rf:
             asr_res = ''.join(rf.readlines())
     else: