#pragma once #include #include #include class TTSEngine { public: TTSEngine(const std::string& encoder_model, const std::string& decoder_model); ~TTSEngine(); // Synthesize: returns PCM float32 samples at 24kHz std::vector synthesize(const std::string& text, float speed = 1.0f, float variation = 0.667f); private: void* enc_engine_ = nullptr; void* enc_context_ = nullptr; void* dec_engine_ = nullptr; void* dec_context_ = nullptr; // NPU inference helpers std::vector encode(const int64_t* tokens, int token_len); std::vector decode(const float* z_p, int mel_len); };