<@U084APK40NS> how can i use eleven labs TTS
# ask-ai
s
@millions-hair-24956 how can i use eleven labs TTS
g
To use Eleven Labs TTS with LiveKit, you can utilize the
elevenlabs.TTS
class from the LiveKit plugins. You need to specify the voice configuration and model when creating an instance of the TTS class. Here's a basic example:
Copy code
from livekit.plugins import elevenlabs

# Create an instance of ElevenLabs TTS
tts = elevenlabs.TTS(
    model_id="eleven_turbo_v2",  # Specify the TTS model
    api_key="YOUR_ELEVENLABS_API_KEY"  # Your ElevenLabs API key
)

# Use the TTS instance in your application
For more details on the parameters and usage, refer to the Eleven Labs TTS documentation. Would you like more detail on integrating this into a LiveKit agent? Sources: - Eleven Labs TTS documentation 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@millions-hair-24956 and do they support STT as well?
g
Eleven Labs primarily provides TTS (Text-to-Speech) services. According to the available data, there is no mention of Eleven Labs offering STT (Speech-to-Text) capabilities within the LiveKit framework. The plugins for Eleven Labs focus on TTS functionalities. For STT, you might consider using other providers like Deepgram, which are supported by LiveKit for speech-to-text tasks. If you need more information on integrating STT with LiveKit, let me know. Sources: - https://docs.livekit.io/python/livekit/agents/voice_assistant/index.html#args - https://docs.livekit.io/python/livekit/agents/pipeline/pipeline_agent.html#args 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.