mirror of
https://github.com/FunAudioLLM/SenseVoice.git
synced 2025-09-15 15:08:35 +08:00
update onnx codes
This commit is contained in:
parent
0858308f36
commit
cd94891c4a
5
demo1.py
5
demo1.py
@ -1,3 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- encoding: utf-8 -*-
|
||||
# Copyright FunASR (https://github.com/FunAudioLLM/SenseVoice). All Rights Reserved.
|
||||
# MIT License (https://opensource.org/licenses/MIT)
|
||||
|
||||
from funasr import AutoModel
|
||||
from funasr.utils.postprocess_utils import rich_transcription_postprocess
|
||||
|
||||
|
||||
5
demo2.py
5
demo2.py
@ -1,3 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- encoding: utf-8 -*-
|
||||
# Copyright FunASR (https://github.com/FunAudioLLM/SenseVoice). All Rights Reserved.
|
||||
# MIT License (https://opensource.org/licenses/MIT)
|
||||
|
||||
from model import SenseVoiceSmall
|
||||
from funasr.utils.postprocess_utils import rich_transcription_postprocess
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- encoding: utf-8 -*-
|
||||
# Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.
|
||||
# Copyright FunASR (https://github.com/FunAudioLLM/SenseVoice). All Rights Reserved.
|
||||
# MIT License (https://opensource.org/licenses/MIT)
|
||||
|
||||
import os
|
||||
@ -44,4 +44,4 @@ wav_or_scp = "/Users/shixian/Downloads/asr_example_hotword.wav"
|
||||
language_list = [0]
|
||||
textnorm_list = [15]
|
||||
res = model_bin(wav_or_scp, language_list, textnorm_list, tokenizer=tokenizer)
|
||||
print(res)
|
||||
print([rich_transcription_postprocess(i) for i in res])
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- encoding: utf-8 -*-
|
||||
# Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.
|
||||
# Copyright FunASR (https://github.com/FunAudioLLM/SenseVoice). All Rights Reserved.
|
||||
# MIT License (https://opensource.org/licenses/MIT)
|
||||
|
||||
import os.path
|
||||
@ -18,9 +19,7 @@ from utils.infer_utils import (
|
||||
get_logger,
|
||||
read_yaml,
|
||||
)
|
||||
# from .utils.postprocess_utils import sentence_postprocess, sentence_postprocess_sentencepiece
|
||||
from utils.frontend import WavFrontend
|
||||
# from .utils.timestamp_utils import time_stamp_lfr6_onnx
|
||||
from utils.infer_utils import pad_list
|
||||
|
||||
logging = get_logger()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user