#pragma once #include "engine/framework/assets/tensor_source.h" #include "engine/framework/core/execution_context.h" #include #include namespace engine::community_models::kitten_tts2 { // XVectorSincNet identity encoder and Kitten's learned Qwen speaker projection. class SpeakerEncoder { public: SpeakerEncoder(const assets::TensorSource & source, const assets::TensorSource & lm, const core::ExecutionContext & execution); ~SpeakerEncoder(); std::vector embed(const std::vector & mono_16k) const; std::vector project(const std::vector & embedding) const; private: struct Impl; std::unique_ptr impl_; }; }