Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update buffer size and overlap size in whisper-processing.h and defau… #95

Merged
merged 4 commits into from
May 2, 2024
Prev Previous commit
Fix typo in update_whisper_model function name
  • Loading branch information
royshil committed May 2, 2024
commit bee32e98ab3b2d403ba186e7130ac92eb43c8ec5
2 changes: 1 addition & 1 deletion src/transcription-filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ void transcription_filter_update(void *data, obs_data_t *s)
}

obs_log(gf->log_level, "update whisper model");
update_whsiper_model(gf, s);
update_whisper_model(gf, s);

obs_log(gf->log_level, "update whisper params");
std::lock_guard<std::mutex> lock(*gf->whisper_ctx_mutex);
Expand Down
3 changes: 2 additions & 1 deletion src/whisper-utils/whisper-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <obs-module.h>

void update_whsiper_model(struct transcription_filter_data *gf, obs_data_t *s)
void update_whisper_model(struct transcription_filter_data *gf, obs_data_t *s)
{
// update the whisper model path
std::string new_model_path = obs_data_get_string(s, "whisper_model_path");
Expand Down Expand Up @@ -140,6 +140,7 @@ void start_whisper_thread_with_path(struct transcription_filter_data *gf, const
#else
std::string silero_vad_model_path = silero_vad_model_file;
#endif
bfree(silero_vad_model_file);
// roughly following https://github.com/SYSTRAN/faster-whisper/blob/master/faster_whisper/vad.py
// for silero vad parameters
gf->vad.reset(new VadIterator(silero_vad_model_path, WHISPER_SAMPLE_RATE, 64, 0.5f, 1000,
Expand Down
2 changes: 1 addition & 1 deletion src/whisper-utils/whisper-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <string>

void update_whsiper_model(struct transcription_filter_data *gf, obs_data_t *s);
void update_whisper_model(struct transcription_filter_data *gf, obs_data_t *s);
void shutdown_whisper_thread(struct transcription_filter_data *gf);
void start_whisper_thread_with_path(struct transcription_filter_data *gf, const std::string &path);

Expand Down
Loading