Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
rtf benchmark
游雁50571828c62e
diff --git a/funasr/export/README.md b/funasr/export/README.mdindex b3068d050..c05348e82 100644--- a/funasr/export/README.md+++ b/funasr/export/README.md@@ -17,7 +17,7 @@ The installation is the same as [funasr](../../README.md)--model-name [model_name] \--export-dir [export_dir] \--type [onnx, torch] \- --quantize \+ --quantize [true, false] \--fallback-num [fallback_num]````model-name`: the model is to export. It could be the models from modelscope, or local finetuned model(named: model.pb).diff --git a/funasr/export/export_model.py b/funasr/export/export_model.pyindex 9a1ef9604..f6ba61616 100644--- a/funasr/export/export_model.py+++ b/funasr/export/export_model.py@@ -10,7 +10,7 @@ import torchfrom funasr.export.models import get_modelimport numpy as npimport random-+from funasr.utils.types import str2bool# torch_version = float(".".join(torch.__version__.split(".")[:2]))# assert torch_version > 1.9@@ -234,7 +234,7 @@ if __name__ == '__main__':parser.add_argument('--model-name', type=str, required=True)parser.add_argument('--export-dir', type=str, required=True)parser.add_argument('--type', type=str, default='onnx', help='["onnx", "torch"]')- parser.add_argument('--quantize', action='store_true', help='export quantized model')+ parser.add_argument('--quantize', type=str2bool, default=False, help='export quantized model')parser.add_argument('--fallback-num', type=int, default=0, help='amp fallback number')parser.add_argument('--audio_in', type=str, default=None, help='["wav", "wav.scp"]')parser.add_argument('--calib_num', type=int, default=200, help='calib max num')diff --git a/funasr/runtime/python/utils/test_rtf.py b/funasr/runtime/python/utils/test_rtf.pyindex fd26fad94..536ee2d87 100644--- a/funasr/runtime/python/utils/test_rtf.py+++ b/funasr/runtime/python/utils/test_rtf.py@@ -2,14 +2,14 @@import timeimport sysimport librosa-+from funasr.utils.types import str2boolimport argparseparser = argparse.ArgumentParser()parser.add_argument('--model_dir', type=str, required=True)parser.add_argument('--backend', type=str, default='onnx', help='["onnx", "torch"]')parser.add_argument('--wav_file', type=str, default=None, help='amp fallback number')-parser.add_argument('--quantize', type=bool, default=False, help='quantized model')+parser.add_argument('--quantize', type=str2bool, default=False, help='quantized model')parser.add_argument('--intra_op_num_threads', type=int, default=1, help='intra_op_num_threads for onnx')args = parser.parse_args()diff --git a/funasr/runtime/python/utils/test_rtf.sh b/funasr/runtime/python/utils/test_rtf.shindex 8ac2143ed..5fa664517 100644--- a/funasr/runtime/python/utils/test_rtf.sh+++ b/funasr/runtime/python/utils/test_rtf.sh@@ -10,7 +10,7 @@ rtf_tool=test_rtf.py#:<<!model_name="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch"backend="onnx" # "torch"-quantize='True' # 'False'+quantize='true' # 'False'tag=${model_name}/${backend}_${quantize}!@@ -21,11 +21,7 @@ echo ${logs_outputs_dir}if [ $stage == 0 ];then- if [ $quantize == 'True' ];thenpython -m funasr.export.export_model --model-name ${model_name} --export-dir ${export_root} --type ${backend} --quantize --audio_in ${scp}- else- python -m funasr.export.export_model --model-name ${model_name} --export-dir ${export_root} --type ${backend}- fifidiff --git a/push_scan.py b/push_scan.pynew file mode 100644index 000000000..e69de29bbdiff --git a/scan.py b/scan.pynew file mode 100644index 000000000..e69de29bb