diff --git a/.gitignore b/.gitignore index 81ce8be..bffb397 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,5 @@ node_modules examples/* .vscode + +.env \ No newline at end of file diff --git a/lib/utils.js b/lib/utils.js index 89b90c2..209d6c1 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -22,8 +22,8 @@ function makeSynthKey({account_sid = '', vendor, language, voice, engine = '', t hash.update(`${language}:${vendor}:${voice}:${engine}:${text}`); const hexHashKey = hash.digest('hex'); const accountKey = account_sid ? `:${account_sid}` : ''; - const extension = getFileExtension(vendor); - const key = `tts${accountKey}:${extension}:${hexHashKey}`; + const namespace = vendor.startsWith('custom') ? vendor : getFileExtension(vendor); + const key = `tts${accountKey}:${namespace}:${hexHashKey}`; return key; }