diff options
| author | cooljqln <cooljqln@noreply.codeberg.org> | 2025-02-07 01:13:52 +0000 |
|---|---|---|
| committer | cooljqln <cooljqln@noreply.codeberg.org> | 2025-02-07 01:13:52 +0000 |
| commit | f0116a3c858685f5fbaa5fe2bc40e3e98df5d029 (patch) | |
| tree | 02574c5da334d8f2da2fd8ea7fbc49229166f282 /src/tangara/tts/provider.cpp | |
| parent | 3bad60d3a3c7e249c9d38508c0c151b0158d99fc (diff) | |
| parent | ffc62ee5e0b5d7f81c07aeb430a1b2566466f717 (diff) | |
| download | tangara-fw-f0116a3c858685f5fbaa5fe2bc40e3e98df5d029.tar.gz | |
Merge pull request 'TTS: Re-enable voice accessbility if /.tangara-tts/ contains audio samples.' (#247) from tursiae/tangara-fw:tts into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/247
Reviewed-by: cooljqln <cooljqln@noreply.codeberg.org>
Diffstat (limited to 'src/tangara/tts/provider.cpp')
| -rw-r--r-- | src/tangara/tts/provider.cpp | 6 |
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(); } |
