Skip to content

Commit

Permalink
Update 11labs tts voice search with new API field name
Browse files Browse the repository at this point in the history
  • Loading branch information
DJDavid98 committed Aug 3, 2024
1 parent 0760f39 commit 3571c37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/hooks/use-eleven-labs-tts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const useElevenLabsTts = ({
const getVoiceId = useCallback((ttsInput?: TtsInput): string | undefined => {
const targetGender = mapPronounsToGender(ttsInput?.pronouns);
const matchingVoice = voicesRef.current.find(voice => {
const { age, gender, 'use case': useCase } = voice.labels;
const { age, gender, use_case: useCase } = voice.labels;
return age === 'young' && gender === targetGender && useCase === 'narration';
});
return matchingVoice ? matchingVoice.voice_id : undefined;
Expand Down

0 comments on commit 3571c37

Please sign in to comment.