Fetch voices via socket connection (keeps API keys server-side)
This is the ONLY method for frontend voice fetching as it:
The backend will use the room's/user's configured TTS credentials to fetch voices.
Socket.io socket instance
TTS provider name (e.g., 'deepgram', 'elevenlabs', 'openai')
Language code (optional, default 'en')
Promise with voices
// In your React componentconst voices = await fetchVoicesViaSocket(socket, 'elevenlabs', 'en');console.log(voices.voices.male, voices.voices.female); Copy
// In your React componentconst voices = await fetchVoicesViaSocket(socket, 'elevenlabs', 'en');console.log(voices.voices.male, voices.voices.female);
Fetch voices via socket connection (keeps API keys server-side)
This is the ONLY method for frontend voice fetching as it:
The backend will use the room's/user's configured TTS credentials to fetch voices.