mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-06 17:21:33 +00:00
wchess minor
This commit is contained in:
parent
8dba8204eb
commit
02ade14f67
@ -1,4 +1,4 @@
|
|||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
add_subdirectory(libwchess)
|
add_subdirectory(libwchess)
|
||||||
|
|
||||||
|
@ -48,9 +48,8 @@ bool WChess::check_running() const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WChess::clear_audio() const {
|
void WChess::clear_audio() const {
|
||||||
if (m_cb.clear_audio) return (*m_cb.clear_audio)();
|
if (m_cb.clear_audio) (*m_cb.clear_audio)();
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WChess::get_audio(int ms, std::vector<float>& pcmf32) const {
|
void WChess::get_audio(int ms, std::vector<float>& pcmf32) const {
|
||||||
|
@ -12,14 +12,14 @@ public:
|
|||||||
using CheckRunningCb = bool (*)();
|
using CheckRunningCb = bool (*)();
|
||||||
using GetAudioCb = void (*)(int, std::vector<float> &);
|
using GetAudioCb = void (*)(int, std::vector<float> &);
|
||||||
using SetMovesCb = void (*)(const std::string &);
|
using SetMovesCb = void (*)(const std::string &);
|
||||||
using CleartAudioCb = bool (*)();
|
using ClearAudioCb = void (*)();
|
||||||
|
|
||||||
struct callbacks {
|
struct callbacks {
|
||||||
SetStatusCb set_status = nullptr;
|
SetStatusCb set_status = nullptr;
|
||||||
CheckRunningCb check_running = nullptr;
|
CheckRunningCb check_running = nullptr;
|
||||||
GetAudioCb get_audio = nullptr;
|
GetAudioCb get_audio = nullptr;
|
||||||
SetMovesCb set_moves = nullptr;
|
SetMovesCb set_moves = nullptr;
|
||||||
CleartAudioCb clear_audio = nullptr;
|
ClearAudioCb clear_audio = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct settings {
|
struct settings {
|
||||||
@ -46,7 +46,7 @@ private:
|
|||||||
void set_status(const std::string& msg) const;
|
void set_status(const std::string& msg) const;
|
||||||
void set_moves(const std::string& moves) const;
|
void set_moves(const std::string& moves) const;
|
||||||
bool check_running() const;
|
bool check_running() const;
|
||||||
bool clear_audio() const;
|
void clear_audio() const;
|
||||||
std::string transcribe(
|
std::string transcribe(
|
||||||
const std::vector<float> & pcmf32,
|
const std::vector<float> & pcmf32,
|
||||||
float & logprob_min,
|
float & logprob_min,
|
||||||
|
@ -118,7 +118,7 @@ void get_audio(int ms, std::vector<float> & pcmf32_cur) {
|
|||||||
g_audio.get(ms, pcmf32_cur);
|
g_audio.get(ms, pcmf32_cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool clear_audio() {
|
void clear_audio() {
|
||||||
g_audio.clear();
|
g_audio.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user