Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wenet --language chinese audio.wav #2559

Closed
icestoneking opened this issue Jun 26, 2024 · 5 comments
Closed

wenet --language chinese audio.wav #2559

icestoneking opened this issue Jun 26, 2024 · 5 comments

Comments

@icestoneking
Copy link

TypeError: integer argument expected, got float

@Mddct
Copy link
Collaborator

Mddct commented Jun 27, 2024

plz supply more info

@azraelkuan
Copy link
Contributor

@Mddct

model = Model(model_dir, beam, context_path, context_score)

there is a parameters error in this line

@XiHenSuper
Copy link

XiHenSuper commented Jul 2, 2024

@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
Copy link
Author

@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
Copy link
Collaborator

Mddct commented Jul 5, 2024

plz see #2563

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants