Building with MSVC

This commit is contained in:
Borislav Stanimirov
2022-10-11 20:57:52 +03:00
parent 28252352d7
commit 0b45d25151
5 changed files with 92 additions and 24 deletions

View File

@@ -2073,6 +2073,8 @@ bool log_mel_spectrogram(
//
struct whisper_context * whisper_init(const char * path_model) {
ggml_time_init();
whisper_context * ctx = new whisper_context;
const int64_t t_start_us = ggml_time_us();
@@ -2260,7 +2262,7 @@ struct whisper_full_params whisper_full_default_params(enum whisper_decode_strat
switch (strategy) {
case WHISPER_DECODE_GREEDY:
{
result = (struct whisper_full_params) {
result = {
.strategy = WHISPER_DECODE_GREEDY,
.n_threads = std::min(4, (int32_t) std::thread::hardware_concurrency()),
.offset_ms = 0,
@@ -2281,7 +2283,7 @@ struct whisper_full_params whisper_full_default_params(enum whisper_decode_strat
} break;
case WHISPER_DECODE_BEAM_SEARCH:
{
result = (struct whisper_full_params) {
result = {
.strategy = WHISPER_DECODE_GREEDY,
.n_threads = std::min(4, (int32_t) std::thread::hardware_concurrency()),
.offset_ms = 0,