mirror of
https://github.com/occ-ai/obs-localvocal
synced 2024-11-08 03:08:07 +00:00
lint
This commit is contained in:
parent
030bb819c3
commit
ad182f4593
@ -78,9 +78,11 @@ struct whisper_context *init_whisper_context(const std::string &model_path)
|
||||
|
||||
#ifdef _WIN32
|
||||
// convert model path UTF8 to wstring (wchar_t) for whisper
|
||||
int count = MultiByteToWideChar(CP_UTF8, 0, model_path.c_str(), (int)model_path.length(), NULL, 0);
|
||||
int count = MultiByteToWideChar(CP_UTF8, 0, model_path.c_str(), (int)model_path.length(),
|
||||
NULL, 0);
|
||||
std::wstring model_path_ws(count, 0);
|
||||
MultiByteToWideChar(CP_UTF8, 0, model_path.c_str(), (int)model_path.length(), &model_path_ws[0], count);
|
||||
MultiByteToWideChar(CP_UTF8, 0, model_path.c_str(), (int)model_path.length(),
|
||||
&model_path_ws[0], count);
|
||||
|
||||
// Read model into buffer
|
||||
std::ifstream modelFile(model_path_ws, std::ios::binary);
|
||||
|
Loading…
Reference in New Issue
Block a user