From ddce9cc8775fad1b2944843f4cd575bac4f4825c Mon Sep 17 00:00:00 2001
From: huangmingming <dyyzhmm@163.com>
Date: 星期二, 31 一月 2023 10:07:50 +0800
Subject: [PATCH] update server env
---
funasr/utils/asr_utils.py | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/funasr/utils/asr_utils.py b/funasr/utils/asr_utils.py
index 4258f05..0bf903c 100644
--- a/funasr/utils/asr_utils.py
+++ b/funasr/utils/asr_utils.py
@@ -49,12 +49,20 @@
r_audio_format = 'pcm'
r_recog_type = 'wav'
- if r_recog_type is None:
+ if audio_in is None:
+ # for raw_inputs
+ r_recog_type = 'wav'
+ r_audio_format = 'pcm'
+
+ if r_recog_type is None and audio_in is not None:
# audio_in is wav, recog_type is wav_file
if os.path.isfile(audio_in):
if audio_in.endswith('.wav') or audio_in.endswith('.WAV'):
r_recog_type = 'wav'
r_audio_format = 'wav'
+ elif audio_in.endswith('.scp') or audio_in.endswith('.SCP'):
+ r_recog_type = 'wav'
+ r_audio_format = 'scp'
# recog_type is datasets_file
elif os.path.isdir(audio_in):
--
Gitblit v1.9.1