FunASR icon indicating copy to clipboard operation
FunASR copied to clipboard

在modelscope下載funasr的標點預測模型,在進行預測時出現錯from funasr import AutoModel,顯示AttributeError: partially initialized module 'torchaudio' has no attribute 'lib' (most likely due to a circular import)

Open alanshaoTT opened this issue 11 months ago • 1 comments

Notice: In order to resolve issues more efficiently, please raise issue following the template. (注意:为了更加高效率解决您遇到的问题,请按照模板提问,补充细节)

🐛 Bug

To Reproduce

Steps to reproduce the behavior (always include the command you ran):

  1. Run cmd '....'
  2. See error test.py如下 from funasr import AutoModel

model = AutoModel(model="ct-punc", model_revision="v2.0.4")

res = model.generate(input="那今天的会就到这里吧 happy new year 明年见") print(res)

image

Environment

使用模型文件https://www.modelscope.cn/models/iic/punc_ct-transformer_zh-cn-common-vocab272727-pytorch/files 安裝了環境是pip install funasr和cuda11.8版本的torch

Additional context

alanshaoTT avatar Mar 26 '24 11:03 alanshaoTT

pip install torchaudio

LauraGPT avatar Mar 27 '24 02:03 LauraGPT