mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-07-24 21:22:00 +00:00
tts key should include model
This commit is contained in:
+9
-2
@@ -17,9 +17,16 @@ const debug = require('debug')('jambonz:realtimedb-helpers');
|
||||
//const nuanceClientMap = new Map();
|
||||
|
||||
function makeSynthKey({
|
||||
account_sid = '', vendor, language, voice, engine = '', text}) {
|
||||
account_sid = '',
|
||||
vendor,
|
||||
language,
|
||||
voice,
|
||||
engine = '',
|
||||
model = '',
|
||||
text
|
||||
}) {
|
||||
const hash = crypto.createHash('sha1');
|
||||
hash.update(`${language}:${vendor}:${voice}:${engine}:${text}`);
|
||||
hash.update(`${language}:${vendor}:${voice}:${engine}:${model}:${text}`);
|
||||
const hexHashKey = hash.digest('hex');
|
||||
const accountKey = account_sid ? `:${account_sid}` : '';
|
||||
const key = `tts${accountKey}:${hexHashKey}`;
|
||||
|
||||
Reference in New Issue
Block a user