mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-24 06:46:37 +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)
|
||||
|
||||
|
@ -48,9 +48,8 @@ bool WChess::check_running() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool WChess::clear_audio() const {
|
||||
if (m_cb.clear_audio) return (*m_cb.clear_audio)();
|
||||
return false;
|
||||
void WChess::clear_audio() const {
|
||||
if (m_cb.clear_audio) (*m_cb.clear_audio)();
|
||||
}
|
||||
|
||||
void WChess::get_audio(int ms, std::vector<float>& pcmf32) const {
|
||||
|
@ -12,14 +12,14 @@ public:
|
||||
using CheckRunningCb = bool (*)();
|
||||
using GetAudioCb = void (*)(int, std::vector<float> &);
|
||||
using SetMovesCb = void (*)(const std::string &);
|
||||
using CleartAudioCb = bool (*)();
|
||||
using ClearAudioCb = void (*)();
|
||||
|
||||
struct callbacks {
|
||||
SetStatusCb set_status = nullptr;
|
||||
CheckRunningCb check_running = nullptr;
|
||||
GetAudioCb get_audio = nullptr;
|
||||
SetMovesCb set_moves = nullptr;
|
||||
CleartAudioCb clear_audio = nullptr;
|
||||
ClearAudioCb clear_audio = nullptr;
|
||||
};
|
||||
|
||||
struct settings {
|
||||
@ -46,7 +46,7 @@ private:
|
||||
void set_status(const std::string& msg) const;
|
||||
void set_moves(const std::string& moves) const;
|
||||
bool check_running() const;
|
||||
bool clear_audio() const;
|
||||
void clear_audio() const;
|
||||
std::string transcribe(
|
||||
const std::vector<float> & pcmf32,
|
||||
float & logprob_min,
|
||||
|
@ -118,7 +118,7 @@ void get_audio(int ms, std::vector<float> & pcmf32_cur) {
|
||||
g_audio.get(ms, pcmf32_cur);
|
||||
}
|
||||
|
||||
bool clear_audio() {
|
||||
void clear_audio() {
|
||||
g_audio.clear();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user