Fix issue with fetching eleven labs voices

This commit is contained in:
Ilango Rajagopal 2025-08-14 13:30:07 +05:30
parent 47dd721177
commit eca7d175fd
2 changed files with 6 additions and 2 deletions

View File

@ -85,7 +85,11 @@ export const getVoices = async (provider: string, credentialId: string, options:
apiKey: credentialData.elevenLabsApiKey apiKey: credentialData.elevenLabsApiKey
}) })
const voices = await client.voices.search() const voices = await client.voices.search({
pageSize: 100,
voiceType: 'default',
category: 'premade'
})
return voices.voices.map((voice) => ({ return voices.voices.map((voice) => ({
id: voice.voiceId, id: voice.voiceId,

View File

@ -78,7 +78,7 @@ const getVoicesForProvider = async (provider: string, credentialId?: string): Pr
chatflowid: '', chatflowid: '',
chatId: '', chatId: '',
appDataSource: appServer.AppDataSource, appDataSource: appServer.AppDataSource,
databaseEntities: {} databaseEntities: databaseEntities
} }
return await getVoices(provider, credentialId, options) return await getVoices(provider, credentialId, options)