add comment

This commit is contained in:
Quan HL
2024-08-12 20:16:24 +07:00
parent ab7e25243d
commit ef23b0807a
+4
View File
@@ -174,6 +174,10 @@ async function synthAudio(client, createHash, retrieveHash, logger, stats, { acc
let cached;
if (!disableTtsCache) {
cached = await client.get(key);
/**
* If we are using tts streaming and also precaching audio, audio could have been cached by streaming (r8)
* or here in speech-utils due to precaching (mp3), so we need to check for both keys.
*/
if (!cached && JAMBONES_EAGERLY_PRE_CACHE_AUDIO) {
const preCachekey = makeSynthKey({
account_sid,