Same cache filename for different languages
Closed this issue · 3 comments
Hi all,
even if not really applicable in the real world i've found a possible caveat in file caching:
if you call the script twice with the same text but different languages (not very frequent but possible) the same file will be played back.
To avoid this i suggest to add language in cached file names as below:
if ($usecache) {
$filename = md5_hex($line) . "_$lang";
Regards
Gianluca
Hello,
thank you for the suggestion. This is already taken care of in recent versions of the script. When we generate the md5 hash that is used as the cached file name we use as input the text, the language and the speed:
$filename = md5_hex("$line.$lang.$speed");
So we make sure to generate different file names regarding to language and also speed of the synthesized text.
Thank you.
Simply great job!
On 27/11/2014 12:17, Lefteris Zafiris wrote:
Hello,
thank you for the suggestion. This is already taken care of in recent
versions of the script. When we generate the md5 hash that is used as
the cached file name we use as input the text, the language and the speed:$filename = md5_hex("$line.$lang.$speed");
So we make sure to generate different file names regarding to language
and also speed of the synthesized text.—
Reply to this email directly or view it on GitHub
#15 (comment).
Cheers!