#pragma once #include "engine/community_models/sanotts/assets.h" #include "engine/framework/runtime/session.h" #include #include #include namespace engine::models::sanotts { struct SanoTtsPiperGenerationOptions { /** Multiplier on the voice's tuned duration_length_scale; larger is * slower. The decoder is deterministic -- there is no seed. */ float speaking_rate = 1.0F; }; class SanoTtsPiperRuntime { public: SanoTtsPiperRuntime( std::shared_ptr assets, core::BackendConfig backend_config); ~SanoTtsPiperRuntime(); runtime::AudioBuffer synthesize( const std::vector & token_ids, const SanoTtsPiperGenerationOptions & options); private: struct State; std::unique_ptr state_; }; } // namespace engine::models::sanotts