Skip to content

Commit

Permalink
Merge pull request #27 from locaal-ai/roy.bump_whisper
Browse files Browse the repository at this point in the history
refactor: Update Onnxruntime version to 1.19.2 and cleanstream log le…
  • Loading branch information
royshil authored Sep 14, 2024
2 parents 6e00016 + dab7b86 commit 3cb36c4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
10 changes: 5 additions & 5 deletions cmake/FetchOnnxruntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(CUSTOM_ONNXRUNTIME_HASH
""
CACHE STRING "Hash of a downloaded ONNX Runtime tarball")

set(Onnxruntime_VERSION "1.17.1")
set(Onnxruntime_VERSION "1.19.2")

if(CUSTOM_ONNXRUNTIME_URL STREQUAL "")
set(USE_PREDEFINED_ONNXRUNTIME ON)
Expand All @@ -25,17 +25,17 @@ if(USE_PREDEFINED_ONNXRUNTIME)

if(APPLE)
set(Onnxruntime_URL "${Onnxruntime_BASEURL}/onnxruntime-osx-universal2-${Onnxruntime_VERSION}.tgz")
set(Onnxruntime_HASH SHA256=9FA57FA6F202A373599377EF75064AE568FDA8DA838632B26A86024C7378D306)
set(Onnxruntime_HASH SHA256=b0289ddbc32f76e5d385abc7b74cc7c2c51cdf2285b7d118bf9d71206e5aee3a)
elseif(MSVC)
set(Onnxruntime_URL "${Onnxruntime_BASEURL}/onnxruntime-win-x64-${Onnxruntime_VERSION}.zip")
set(OOnnxruntime_HASH SHA256=4802AF9598DB02153D7DA39432A48823FF69B2FB4B59155461937F20782AA91C)
set(OOnnxruntime_HASH SHA256=dc4f841e511977c0a4f02e5066c3d9a58427644010ab4f89b918614a1cd4c2b0)
else()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(Onnxruntime_URL "${Onnxruntime_BASEURL}/onnxruntime-linux-aarch64-${Onnxruntime_VERSION}.tgz")
set(Onnxruntime_HASH SHA256=70B6F536BB7AB5961D128E9DBD192368AC1513BFFB74FE92F97AAC342FBD0AC1)
set(Onnxruntime_HASH SHA256=dc4f841e511977c0a4f02e5066c3d9a58427644010ab4f89b918614a1cd4c2b0)
else()
set(Onnxruntime_URL "${Onnxruntime_BASEURL}/onnxruntime-linux-x64-gpu-${Onnxruntime_VERSION}.tgz")
set(Onnxruntime_HASH SHA256=613C53745EA4960ED368F6B3AB673558BB8561C84A8FA781B4EA7FB4A4340BE4)
set(Onnxruntime_HASH SHA256=4d1c10f0b410b67261302c6e18bb1b05ba924ca9081e3a26959e0d12ab69f534)
endif()
endif()
else()
Expand Down
19 changes: 12 additions & 7 deletions src/cleanstream-filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void cleanstream_destroy(void *data)

void cleanstream_update(void *data, obs_data_t *s)
{
obs_log(LOG_INFO, "cleanstream_update");
obs_log(LOG_DEBUG, "cleanstream_update");

struct cleanstream_data *gf = static_cast<struct cleanstream_data *>(data);

Expand Down Expand Up @@ -270,7 +270,7 @@ void cleanstream_update(void *data, obs_data_t *s)
gf->whisper_params.length_penalty = (float)obs_data_get_double(s, "length_penalty");
}

obs_log(LOG_INFO, "cleanstream update finished");
obs_log(LOG_DEBUG, "cleanstream update finished");
}

void *cleanstream_create(obs_data_t *settings, obs_source_t *filter)
Expand Down Expand Up @@ -523,20 +523,25 @@ obs_properties_t *cleanstream_properties(void *data)
// If advanced settings is enabled, show the advanced settings group
const bool show_hide = obs_data_get_bool(settings, "advanced_settings");
for (const std::string &prop_name :
{"whisper_params_group", "log_words", "vad_enabled", "log_level"}) {
{"whisper_params_group", "advanced_settings_group"}) {
obs_property_set_visible(obs_properties_get(props, prop_name.c_str()),
show_hide);
}
return true;
});

obs_properties_add_bool(ppts, "vad_enabled", MT_("vad_enabled"));
obs_property_t *list = obs_properties_add_list(ppts, "log_level", MT_("log_level"),
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
obs_properties_t *advanced_settings_group = obs_properties_create();
obs_properties_add_group(ppts, "advanced_settings_group", MT_("Advanced_Settings"),
OBS_GROUP_NORMAL, advanced_settings_group);

obs_properties_add_bool(advanced_settings_group, "vad_enabled", MT_("vad_enabled"));
obs_property_t *list = obs_properties_add_list(advanced_settings_group, "log_level",
MT_("log_level"), OBS_COMBO_TYPE_LIST,
OBS_COMBO_FORMAT_INT);
obs_property_list_add_int(list, "DEBUG", LOG_DEBUG);
obs_property_list_add_int(list, "INFO", LOG_INFO);
obs_property_list_add_int(list, "WARNING", LOG_WARNING);
obs_properties_add_bool(ppts, "log_words", MT_("log_words"));
obs_properties_add_bool(advanced_settings_group, "log_words", MT_("log_words"));

obs_properties_t *whisper_params_group = obs_properties_create();
obs_properties_add_group(ppts, "whisper_params_group", MT_("Whisper_Parameters"),
Expand Down

0 comments on commit 3cb36c4

Please sign in to comment.