mirror of
https://github.com/geekwenjie/SmartJavaAI.git
synced 2026-09-10 03:28:49 +00:00
解决vosk中文乱码问题
This commit is contained in:
@@ -56,6 +56,8 @@ public class VoskRecognizer implements SpeechRecognizer{
|
||||
@Override
|
||||
public void loadModel(AsrModelConfig config) {
|
||||
this.config = config;
|
||||
//防止中文乱码
|
||||
System.setProperty("jna.encoding","utf-8");
|
||||
if(StringUtils.isBlank(config.getModelPath())){
|
||||
throw new AsrException("modelPath is null");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user