Update funasr_asr.py

This commit is contained in:
RVC-Boss 2024-02-12 18:03:40 +08:00 committed by GitHub
parent 2fa74ecb94
commit d82f6bbb98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,7 +43,7 @@ def execute_asr(input_folder, output_folder, model_size, language):
text = model.generate(input="%s/%s"%(input_folder, name))[0]["text"]
output.append(f"{input_folder}/{name}|{output_file_name}|{language.upper()}|{text}")
except:
return print(traceback.format_exc())
print(traceback.format_exc())
output_folder = output_folder or "output/asr_opt"
os.makedirs(output_folder, exist_ok=True)
@ -73,4 +73,4 @@ if __name__ == '__main__':
output_folder = cmd.output_folder,
model_size = cmd.model_size,
language = cmd.language,
)
)