Skip to content

在华为昇腾310I Duo上跑,巨慢,60秒的wav文件跑了30多秒,模型是sensevoicesmall #3029

Description

@ppgod

代码如下:from funasr import AutoModel
from funasr.utils.postprocess_utils import rich_transcription_postprocess

model = AutoModel(
model='/home/model/u8_model',
trust_remote_code=True,
remote_code="/home/model/model.py",
vad_kwargs={"max_single_segment_time": 10000},
device="npu:0",
disable_update=True
)

========== 正式推理计时 ==========

start = time.time()
res = model.generate(
input='/root/C_JSSR055116_20241016102013_18079131618_otalk.wav',
cache={},
language="zh",
use_itn=True,
batch_size_s=30,
merge_length_s=30,
)
end = time.time()

text = rich_transcription_postprocess(res[0]["text"])
print(text)
print(f"耗时: {end - start:.2f} 秒")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageNeeds maintainer triage and routing

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions