Rémi Bernon (@rbernon) commented about dlls/windows.media.speech/vosk.c:
return STATUS_SUCCESS;
- if ((env = getenv("XDG_CACHE_HOME")))
- {
path = malloc(strlen(env) + strlen(vosk) + 1);
sprintf(path, "%s%s", env, vosk);
status = find_model_by_lang_and_path(path, lcid, model);
- }
- else if ((env = getenv("HOME")))
- {
path = malloc(strlen(env) + strlen(cache_vosk) + 1);
sprintf(path, "%s%s", env, cache_vosk);
status = find_model_by_lang_and_path(path, lcid, model);
- }
Pretty sure you want the lookup order to be `VOSK_MODEL_PATH` > `~/.cache/vosk` > `/usr/share`?
I think the XDG_CACHE_HOME / HOME could be factored together a bit more.