fix fetch eleven voice and language (#241)

This commit is contained in:
Hoan Luu Huu
2023-10-13 19:06:35 +07:00
committed by GitHub
parent 4c9af253a3
commit bf9ae3b5ce

View File

@@ -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') {