Skip to content

Commit

Permalink
fix fetch eleven voice and language (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu authored Oct 13, 2023
1 parent 4c9af25 commit bf9ae3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/routes/api/speech-credentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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') {
Expand Down

0 comments on commit bf9ae3b

Please sign in to comment.