alphacep / alphacep/vosk-api

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

Ouverte
#653 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Jupyter Notebook
Étoiles
15.1k
Forks
1.8k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.