#pragma once #include "engine/framework/assets/tensor_source.h" #include "engine/framework/core/execution_context.h" #include #include #include namespace engine::models::sam_audio { struct TextConditioning { std::vector tokens; std::vector features; }; class T5TextEncoder { public: T5TextEncoder(std::shared_ptr source, core::ExecutionContext & execution, const std::filesystem::path & config, const std::filesystem::path & tokenizer, int64_t max_length = 512); ~T5TextEncoder(); TextConditioning encode(const std::string & text); private: struct Impl; std::unique_ptr impl_; }; } // namespace engine::models::sam_audio