summaryrefslogtreecommitdiff
path: root/src/tangara/tts/player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tangara/tts/player.cpp')
-rw-r--r--src/tangara/tts/player.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tangara/tts/player.cpp b/src/tangara/tts/player.cpp
index 9cc7a1f7..1b1e0bcf 100644
--- a/src/tangara/tts/player.cpp
+++ b/src/tangara/tts/player.cpp
@@ -44,7 +44,11 @@ auto Player::playFile(const std::string& text, const std::string& file)
stream_playing_ = true;
}
- openAndDecode(text, file);
+ // Only attempt playback if the card contains samples.
+ // We gate this on directory existence to avoid spamming the logs.
+ if (Provider::SamplesOnSDCard()) {
+ openAndDecode(text, file);
+ }
if (!stream_cancelled_) {
events::Audio().Dispatch(audio::TtsPlaybackChanged{.is_playing = false});