From 9475d10d1000c7e21a7ea311b0c8ee6a72ef46c4 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 19 Jul 2024 13:59:30 +1000 Subject: WIP initial tts player wiring --- src/tangara/audio/audio_fsm.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/tangara/audio/audio_fsm.cpp') diff --git a/src/tangara/audio/audio_fsm.cpp b/src/tangara/audio/audio_fsm.cpp index ad60ab86..dbf1954c 100644 --- a/src/tangara/audio/audio_fsm.cpp +++ b/src/tangara/audio/audio_fsm.cpp @@ -43,6 +43,7 @@ #include "sample.hpp" #include "system_fsm/service_locator.hpp" #include "system_fsm/system_events.hpp" +#include "tts/player.hpp" namespace audio { @@ -369,6 +370,11 @@ void Uninitialised::react(const system_fsm::BootComplete& ev) { sBtOutput.reset(new BluetoothAudioOutput( sServices->bluetooth(), *sDrainBuffers, sServices->bg_worker())); + auto& tts_provider = sServices->tts(); + auto tts_player = std::make_unique( + sServices->bg_worker(), sDrainBuffers->second, *sStreamFactory); + tts_provider.player(std::move(tts_player)); + auto& nvs = sServices->nvs(); sI2SOutput->SetMaxVolume(nvs.AmpMaxVolume()); sI2SOutput->SetVolume(nvs.AmpCurrentVolume()); -- cgit v1.2.3