wenet-e2e / wenet

Production First and Production Ready End-to-End Speech Recognition Toolkit
https://wenet-e2e.github.io/wenet/
Apache License 2.0
4.08k stars 1.07k forks source link

wenet --language chinese audio.wav #2559

Closed icestoneking closed 2 months ago

icestoneking commented 3 months ago

TypeError: integer argument expected, got float

Mddct commented 3 months ago

plz supply more info

azraelkuan commented 3 months ago

@Mddct https://github.com/wenet-e2e/wenet/blob/dec409bf9c6fd6280fb04abc02ea7470ff6114b7/wenet/cli/model.py#L172 there is a parameters error in this line

XiHenSuper commented 3 months ago

@Mddct @azraelkuan 我也碰到这个问题,请问怎么解决? context_list_path这个文件是什么文件?有示例吗?


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "wenet/wenet/cli/model.py", line 172, in load_model
    model = Model(model_dir, beam, context_path, context_score)
  File "wenet/wenet/cli/model.py", line 54, in __init__
    self.context_graph = ContextGraph(context_path,
  File "wenet/wenet/utils/context_graph.py", line 130, in __init__
    self.context_list = tokenize(context_list_path, symbol_table,
  File "wenet/wenet/utils/context_graph.py", line 35, in tokenize
    with open(context_list_path, "r") as fin:
TypeError: expected str, bytes or os.PathLike object, not float
icestoneking commented 2 months ago

@Mddct @azraelkuan 我也碰到这个问题,请问怎么解决? context_list_path这个文件是什么文件?有示例吗?

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "wenet/wenet/cli/model.py", line 172, in load_model
    model = Model(model_dir, beam, context_path, context_score)
  File "wenet/wenet/cli/model.py", line 54, in __init__
    self.context_graph = ContextGraph(context_path,
  File "wenet/wenet/utils/context_graph.py", line 130, in __init__
    self.context_list = tokenize(context_list_path, symbol_table,
  File "wenet/wenet/utils/context_graph.py", line 35, in tokenize
    with open(context_list_path, "r") as fin:
TypeError: expected str, bytes or os.PathLike object, not float

楼上的解决方案是对的,参数没对齐。model = Model(model_dir, beam, context_path, context_score)

Mddct commented 2 months ago

plz see https://github.com/wenet-e2e/wenet/pull/2563