Skip to content

Commit b3a6018

Browse files
author
Judd
committed
fix building with MSVC + SDL2
1 parent d682e15 commit b3a6018

File tree

6 files changed

+9
-1
lines changed

6 files changed

+9
-1
lines changed

examples/command/command.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <thread>
2222
#include <vector>
2323
#include <map>
24+
#include <chrono>
2425

2526
// command-line parameters
2627
struct whisper_params {

examples/lsp/lsp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <vector>
1212
#include <deque>
1313
#include <set>
14+
#include <chrono>
1415

1516
using json = nlohmann::json;
1617

examples/server/server.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <vector>
1313
#include <cstring>
1414
#include <sstream>
15+
#include <chrono>
1516

1617
#if defined(_MSC_VER)
1718
#pragma warning(disable: 4244 4267) // possible loss of data

examples/stream/stream.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <thread>
1313
#include <vector>
1414
#include <fstream>
15-
15+
#include <chrono>
1616

1717
// command-line parameters
1818
struct whisper_params {
@@ -157,6 +157,7 @@ int main(int argc, char ** argv) {
157157
cparams.use_gpu = params.use_gpu;
158158
cparams.flash_attn = params.flash_attn;
159159

160+
fprintf(stderr, "whisper_init_from_file_with_params ...\n");
160161
struct whisper_context * ctx = whisper_init_from_file_with_params(params.model.c_str(), cparams);
161162

162163
std::vector<float> pcmf32 (n_samples_30s, 0.0f);
@@ -166,6 +167,8 @@ int main(int argc, char ** argv) {
166167
std::vector<whisper_token> prompt_tokens;
167168

168169
// print some info about the processing
170+
fprintf(stderr, "whisper_init_from_file_with_params ok\n");
171+
169172
{
170173
fprintf(stderr, "\n");
171174
if (!whisper_is_multilingual(ctx)) {

examples/talk-llama/talk-llama.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <vector>
1616
#include <regex>
1717
#include <sstream>
18+
#include <chrono>
1819

1920
static std::vector<llama_token> llama_tokenize(struct llama_context * ctx, const std::string & text, bool add_bos) {
2021
const llama_model * model = llama_get_model(ctx);

examples/wchess/libwchess/WChess.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "grammar-parser.h"
44
#include "common.h"
55
#include <thread>
6+
#include <chrono>
67

78
WChess::WChess(whisper_context * ctx,
89
const whisper_full_params & wparams,

0 commit comments

Comments
 (0)