Skip to content
New issue

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

Non-Flatpak path for models #69

Open
phodina opened this issue Jun 12, 2023 · 1 comment
Open

Non-Flatpak path for models #69

phodina opened this issue Jun 12, 2023 · 1 comment

Comments

@phodina
Copy link

phodina commented Jun 12, 2023

Hi @abb128 ,

as packaging this software there is issue with the FHS.

The path to the data model is under /app which is not compatible with packaging model of most distributions.

Would it be possible not to hardcode the path and rather either specify it when the tool starts or it's loaded from configuration file?

#define GET_MODEL_PATH() (getenv("APRIL_MODEL_PATH") == NULL) ? "/app/LiveCaptions/models/aprilv0_en-us.april" : getenv("APRIL_MODEL_PATH")

if(g_str_equal(model, "/app/LiveCaptions/models/aprilv0_en-us.april")) return;

"ONNX_ROOT" : "/app/onnx_root"

<default>['/app/LiveCaptions/models/aprilv0_en-us.april']</default>

@abb128
Copy link
Owner

abb128 commented Jun 14, 2023

I'm not sure the best way to approach making the model path configurable. I'd like to avoid using a separate configuration file because I'm already using gsettings, but it seems like there may be no way around it for packaging. Specifying it when starting livecaptions might be a bit odd. You can already change it by specifying the APRIL_MODEL_PATH environment variable (although I believe this may have issues with the model switcher), but I'm not sure whether that's good enough for packaging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants