Jinoh Kang (@iamahuman) commented about dlls/windows.media.speech/unixlib.c:
- VoskRecognizer *recognizer = NULL;
- VoskModel *model = NULL;
- NTSTATUS status = STATUS_SUCCESS;
- TRACE("args %p.\n", args);
- if (!vosk_handle)
return STATUS_NOT_SUPPORTED;
- if ((status = find_model_by_locale(params->locale, &model)))
return status;
- if (!(recognizer = p_vosk_recognizer_new(model, params->sample_rate)))
status = STATUS_UNSUCCESSFUL;
- /* The model is kept alive inside the recognizer, so we can safely free our ref here. */
Nit: the comment needs clarification. The recognizezr might not have been created due to an error; in this case, the model (`model`) is not actually kept alive inside the recognizer.
```suggestion:-0+0 /* VoskModel is reference-counted. A VoskRecognizer keeps a reference to its model. */ ```