We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
如何实例化一个OfflineRecognizer, 然后动态改变language? 例如
OfflineRecognizer
language
model = sherpa_onnx.OfflineRecognizer.from_sense_voice( 'model.int8.onnx', 'tokens.txt', language='zh', use_itn=True, debug=False, ) # 这里是zh的model stream = model.create_stream() stream.accept_waveform(16000, decode_audio(data)) model.decode_stream(stream) # 这里想切换为yue, 而不想重新load一个model, 如何正确改变language? # 例如 model.config.model_config.sense_voice.language = 'yue'
上面的代码看起来没问题, 不过不确定是否正确改变了设置
The text was updated successfully, but these errors were encountered:
目前只有初始化的时候才能指定语言。
你可以帮忙实现下动态指定语言?
(个人经验,你指定是 en, 也可以识别粤语的. 指不指定语言,关系不大, 用 auto 就行).
Sorry, something went wrong.
了解, 我晚点看看代码是如何传递的
可以实现那个 SetConfig() 方法.
No branches or pull requests
如何实例化一个
OfflineRecognizer
, 然后动态改变language
?例如
上面的代码看起来没问题, 不过不确定是否正确改变了设置
The text was updated successfully, but these errors were encountered: