Rémi Bernon (@rbernon) commented about dlls/windows.media.speech/vosk.c:
len = strlen(vosk_model_identifier_small);
if (strncmp(dir_name, vosk_model_identifier_small, len))
{
len = strlen(vosk_model_identifier);
if (strncmp(dir_name, vosk_model_identifier, len))
continue;
}
dir_name += len;
/* First match for lang and region (en_us), then only lang (en). */
if (strncmp(dir_name, lang_region, 5) && strncmp(dir_name, lang_region, 2))
continue;
if(!(model_path = malloc(path_len + 1 /* '/' */ + strlen(dirent->d_name) + 1)))
return STATUS_MEMORY_NOT_ALLOCATED;
You probably need to break here, to close the directory iterator. Also the if is missing a space.