mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 09:08:02 +00:00
feat fallback speech
This commit is contained in:
@@ -235,7 +235,7 @@ class Dialogflow extends Task {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const {filePath, servedFromCache} = await this.fallbackSynthAudio(cs, intent, stats);
|
const {filePath, servedFromCache} = await this.fallbackSynthAudio(cs, intent, stats, synthAudio);
|
||||||
if (filePath) cs.trackTmpFile(filePath);
|
if (filePath) cs.trackTmpFile(filePath);
|
||||||
if (!this.ttsCredentials && !servedFromCache) cs.billForTts(intent.fulfillmentText.length);
|
if (!this.ttsCredentials && !servedFromCache) cs.billForTts(intent.fulfillmentText.length);
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ class Dialogflow extends Task {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fallbackSynthAudio(cs, intent, stats) {
|
async fallbackSynthAudio(cs, intent, stats, synthAudio) {
|
||||||
try {
|
try {
|
||||||
const obj = {
|
const obj = {
|
||||||
account_sid: cs.accountSid,
|
account_sid: cs.accountSid,
|
||||||
|
|||||||
Reference in New Issue
Block a user