#pragma once
#include "transcribe-backend.h"
#include "transcribe-kaldi-fbank.h"
#include "transcribe-load-common.h"
#include "transcribe-model.h"
#include "transcribe-session.h"
#include "transcribe-tokenizer.h"
#include "weights.h"
#include <cstdint>
#include <memory>
#include <vector>
struct ggml_context;
struct ggml_backend_buffer;
struct ggml_backend_sched;
typedef struct ggml_backend_buffer * ggml_backend_buffer_t;
typedef struct ggml_backend_sched * ggml_backend_sched_t;
namespace transcribe::sensevoice {
void apply_family_invariants(transcribe_model & model);
struct SenseVoiceModel final : public transcribe_model {
transcribe::Tokenizer tok;
SenseVoiceHParams hparams;
SenseVoiceWeights weights;
ggml_context * ctx_meta = nullptr;
transcribe::BackendPlan plan;
transcribe::load_common::WeightStorage weight_storage;
std::unique_ptr<transcribe::KaldiFbankFrontend> frontend;
SenseVoiceModel() = default;
~SenseVoiceModel() override;
const transcribe::Tokenizer * tokenizer() const override { return &tok; }
};
struct SenseVoiceSession final : public transcribe_session {
std::vector<float> frontend_buf; std::vector<float> pe_buf; std::vector<float> logits_buf; std::vector<int32_t> token_ids;
SenseVoiceSession() = default;
~SenseVoiceSession() override;
};
}