alphacep / alphacep/vosk-api

How to bundle model in to an executable Java JAR file?

未關閉
#653 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Jupyter Notebook
星號
15.1k
分支
1.8k
PR 合併指標
30 天內沒有已合併 PR

描述

I can run the code fine from IDE by referencing model folders placed in REOURCES or SRC folder like these.
**try(Model model = new Model("src/model2");
try(Model model = new Model("resources/model1");**

However,I can't seem to make it work once the code is compiled into an executable JAR file. I need the full thing bundled as a single JAR for my use case.

I tried many ways to reference it including following format
**try(Model model = new Model("jar:file:/Users/..../My_App.jar!/model1");**

How can we point to "resources/model1" so it still works when part of jar file? My project looks like this:
Screen Shot 2021-08-04 at 12 41 09 PM

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。