From 29a88ddc16cfe6c3fa7dda289fd7c9e6e64ccec5 Mon Sep 17 00:00:00 2001 From: Quan HL Date: Mon, 6 Nov 2023 13:16:04 +0700 Subject: [PATCH] fix --- lib/routes/api/speech-credentials.js | 3 ++- lib/routes/api/tts-cache.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/routes/api/speech-credentials.js b/lib/routes/api/speech-credentials.js index 7c37ea9d..41f56739 100644 --- a/lib/routes/api/speech-credentials.js +++ b/lib/routes/api/speech-credentials.js @@ -4,7 +4,8 @@ const Account = require('../../models/account'); const SpeechCredential = require('../../models/speech-credential'); const sysError = require('../error'); const {decrypt, encrypt} = require('../../utils/encrypt-decrypt'); -const {parseAccountSid, parseServiceProviderSid, parseSpeechCredentialSid, decryptCredential} = require('./utils'); +const {parseAccountSid, parseServiceProviderSid, parseSpeechCredentialSid} = require('./utils'); +const {decryptCredential} = require('../../utils/speech-utils'); const {DbErrorUnprocessableRequest, DbErrorForbidden} = require('../../utils/errors'); const { testGoogleTts, diff --git a/lib/routes/api/tts-cache.js b/lib/routes/api/tts-cache.js index 70f9935d..222e171b 100644 --- a/lib/routes/api/tts-cache.js +++ b/lib/routes/api/tts-cache.js @@ -75,7 +75,7 @@ router.post('/Synthesize', async(req, res) => { const { filePath } = await synthAudio(stats, { account_sid: accountSid, text, - vendor: cred, + vendor: cred.vendor, language, voice, engine,