#pragma once #include "engine/framework/assets/tensor_source.h" #include "engine/framework/core/execution_context.h" #include "engine/models/meanvc2/audio_pipeline.h" #include #include #include #include namespace engine::models::meanvc2 { struct MeanVC2WenetConformerWeights; struct MeanVC2WenetConformerGraph; class MeanVC2WenetConformerRuntime final { public: MeanVC2WenetConformerRuntime( std::shared_ptr source, engine::core::ExecutionContext & execution_context, size_t weight_context_bytes, size_t graph_context_bytes, engine::assets::TensorStorageType weight_storage_type); ~MeanVC2WenetConformerRuntime(); void reset(); std::vector encode_windows(const std::vector & windows); private: engine::core::ExecutionContext & execution_context_; size_t graph_context_bytes_ = 0; std::shared_ptr source_; std::shared_ptr weights_; mutable std::unique_ptr graph_; std::vector attention_cache_; std::vector conv_cache_; }; } // namespace engine::models::meanvc2