Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Oct 14, 2023
1 parent 12fa758 commit 1943e3c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/routes/api/speech-credentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,13 @@ const getTtsVoices = async(vendor, label, service_provider_sid, account_sid) =>
return resp ? resp.voices.map((v) => {
return {
value: v.voice_id,
name: `${v.name}${v.category !== 'premade' ? ` (${v.category})` : ''} - ${v.labels.accent},
${v.labels.description}, ${v.labels.age}, ${v.labels.gender}, ${v.labels['use case']}`
name: `${v.name}${v.category !== 'premade' ? ` (${v.category})` : ''} -
${v.labels.accent ? ` ${v.labels.accent},` : ''}
${v.labels.description ? ` ${v.labels.description},` : ''}
${v.labels.age ? ` ${v.labels.age},` : ''}
${v.labels.gender ? ` ${v.labels.gender},` : ''}
${v.labels['use case'] ? ` ${v.labels['use case']},` : ''}
`
};
}).sort((a, b) => a.name.localeCompare(b.name)) : [];
}
Expand Down

0 comments on commit 1943e3c

Please sign in to comment.