summaryrefslogtreecommitdiff
path: root/src/tangara/tts/provider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tangara/tts/provider.cpp')
-rw-r--r--src/tangara/tts/provider.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tangara/tts/provider.cpp b/src/tangara/tts/provider.cpp
index d19500e0..eedfe959 100644
--- a/src/tangara/tts/provider.cpp
+++ b/src/tangara/tts/provider.cpp
@@ -28,7 +28,11 @@ static const char* kTtsPath = "/.tangara-tts/";
static auto textToFile(const std::string& text) -> std::optional<std::string> {
uint64_t hash = komihash(text.data(), text.size(), 0);
std::stringstream stream;
- stream << kTtsPath << std::hex << hash;
+ // Assume the TTS sample is a .wav file; since we only support one low-RAM
+ // overhead codec, we can presume the suffix. The suffix is needed, else we
+ // fail to open the stream when it fails to autodetect the format when looking
+ // up tags.
+ stream << kTtsPath << std::hex << hash << ".wav";
return stream.str();
}