mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
support tts caching
This commit is contained in:
@@ -25,7 +25,8 @@ function makeTask(logger, obj, parent) {
|
||||
const TaskHangup = require('./hangup');
|
||||
return new TaskHangup(logger, data, parent);
|
||||
case TaskName.Say:
|
||||
if (data.vendor === 'google' && !data.language) {
|
||||
if (data.synthesizer.vendor === 'google' && !data.synthesizer.language) {
|
||||
logger.debug('creating legacy say task');
|
||||
const TaskSayLegacy = require('./say-legacy');
|
||||
return new TaskSayLegacy(logger, data, parent);
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ class TaskSay extends Task {
|
||||
}, this.synthesizer);
|
||||
|
||||
while (!this.killed && this.loop--) {
|
||||
this.logger.debug(`TaskSay: remaining loops ${this.loop}`);
|
||||
if (!filepath) {
|
||||
this.logger.debug('TaskSay:exec - retrieving synthesized audio');
|
||||
filepath = await synthAudio(opts);
|
||||
cs.trackTmpFile(filepath);
|
||||
}
|
||||
|
||||
@@ -190,11 +190,14 @@
|
||||
"enum": ["google", "aws", "polly"]
|
||||
},
|
||||
"language": "string",
|
||||
"voice": "string"
|
||||
"voice": "string",
|
||||
"gender": {
|
||||
"type": "string",
|
||||
"enum": ["MALE", "FEMALE", "NEUTRAL"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"vendor",
|
||||
"language"
|
||||
"vendor"
|
||||
]
|
||||
},
|
||||
"recognizer": {
|
||||
|
||||
Reference in New Issue
Block a user