wchess : minor

This commit is contained in:
Georgi Gerganov 2023-11-28 15:10:18 +02:00
parent ee65df7982
commit 4260d4fc70
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
2 changed files with 9 additions and 3 deletions

View File

@ -26,8 +26,8 @@ public:
int32_t vad_ms = 2000;
int32_t prompt_ms = 5000;
int32_t command_ms = 4000;
float vad_thold = 0.1f;
float freq_thold = -1.0f;
float vad_thold = 0.2f;
float freq_thold = 100.0f;
bool print_energy = false;
};

View File

@ -44,10 +44,15 @@ void get_audio(int ms, std::vector<float> & audio) {
}
bool check_running() {
g_pcmf32.clear();
//g_pcmf32.clear();
return g_running;
}
bool clear_audio() {
g_pcmf32.clear();
return true;
}
void wchess_main(size_t i) {
struct whisper_full_params wparams = whisper_full_default_params(whisper_sampling_strategy::WHISPER_SAMPLING_GREEDY);
@ -81,6 +86,7 @@ void wchess_main(size_t i) {
cb.check_running = check_running;
cb.get_audio = get_audio;
cb.set_moves = set_moves;
cb.clear_audio = clear_audio;
WChess(g_contexts[i], wparams, cb, {}).run();
if (i < g_contexts.size()) {