diff --git a/lib/synth-audio.js b/lib/synth-audio.js index d916af9..808a41a 100644 --- a/lib/synth-audio.js +++ b/lib/synth-audio.js @@ -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,