From bf9ae3b5cea251dd0290ec9e49aefa9eba58deb4 Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Fri, 13 Oct 2023 19:06:35 +0700 Subject: [PATCH] fix fetch eleven voice and language (#241) --- lib/routes/api/speech-credentials.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/api/speech-credentials.js b/lib/routes/api/speech-credentials.js index 37870c40..6d4f341d 100644 --- a/lib/routes/api/speech-credentials.js +++ b/lib/routes/api/speech-credentials.js @@ -797,7 +797,7 @@ router.post('/languages', async(req, res) => { }); const getTtsVoices = async(vendor, label, service_provider_sid, account_sid) => { - const credentials = await SpeechCredential.isAvailableVendorAndLabel( + const credentials = await SpeechCredential.getSpeechCredentialsByVendorAndLabel( service_provider_sid, account_sid, vendor, label); const cred = credentials && credentials.length > 0 ? credentials[0] : null; if (vendor === 'elevenlabs') { @@ -819,7 +819,7 @@ const getTtsVoices = async(vendor, label, service_provider_sid, account_sid) => }; const getTtsLanguages = async(vendor, label, service_provider_sid, account_sid) => { - const credentials = await SpeechCredential.isAvailableVendorAndLabel( + const credentials = await SpeechCredential.getSpeechCredentialsByVendorAndLabel( service_provider_sid, account_sid, vendor, label); const cred = credentials && credentials.length > 0 ? credentials[0] : null; if (vendor === 'elevenlabs') {