#pragma once #include "engine/framework/assets/tensor_source.h" #include "engine/framework/core/execution_context.h" #include "engine/framework/runtime/session.h" #include "engine/models/firered_audio/assets.h" #include #include #include namespace engine::models::firered_audio { std::vector prepare_firered_prompt_audio_24k( const engine::runtime::AudioBuffer & audio, const FireRedAudioRedAeConfig & config, int64_t patch_size); class FireRedAudioRedAeRuntime { public: FireRedAudioRedAeRuntime( std::shared_ptr assets, engine::core::ExecutionContext & execution, size_t graph_arena_bytes, size_t weight_context_bytes, engine::assets::TensorStorageType storage_type); ~FireRedAudioRedAeRuntime(); FireRedAudioRedAeRuntime(const FireRedAudioRedAeRuntime &) = delete; FireRedAudioRedAeRuntime & operator=(const FireRedAudioRedAeRuntime &) = delete; std::vector encode(const std::vector & audio_24k); engine::runtime::AudioBuffer decode(const std::vector & latents); void release_graphs(); private: class Impl; std::unique_ptr impl_; }; } // namespace engine::models::firered_audio