我试过使用VOSK,但得到了以下错误:
ERROR (VoskAPI:Model():model.cc:122) Folder 'fa' does not contain model files. Make sure you specified the model path properly in Model constructor. If you are not sure about relative path, use absolute path specification.
2021-10-24 11:54:00.306 ERROR 17856 --- [nio-8080-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.Error: Invalid memory access] with root cause发布于 2022-06-24 19:40:23
从https://alphacephei.com/vosk/models下载您想要的语言模型之后,您必须解压缩压缩文件夹中的文件。
例如:西班牙模型下载压缩文件夹“vosk Small-Es-0.22”,您必须将文件和文件夹放入“vosk Small-Es-0.22”中传递给model构造函数的路径中。
模型构造函数接受绝对路径:
try (Model model = new Model("D:\\models\\spanish")
{
... your code here...
}我做了一些测试,Vosk识别了我的音频,如果它们是16 the的单wav (我使用胆量进行转换)。
https://stackoverflow.com/questions/69695446
复制相似问题