is any method find use open source tts like coqui ...
# ask-ai
r
is any method find use open source tts like coqui tts on live kit
t
Thanks for reaching out, Av. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
LiveKit doesn’t have a built-in integration for Coqui TTS just yet, but don’t worry—it’s definitely doable with a bit of custom development. If you’ve set up Coqui TTS with an OpenAI-compatible API interface (like through a wrapper or server that handles
/v1/audio/speech
POST requests with similar JSON parameters), you can actually use the OpenAI TTS plugin in LiveKit by pointing the
base_url
to your Coqui TTS server. Here’s a quick example of what that configuration might look like:
Copy code
tts=openai.TTS(
    model="your-coqui-model-name",
    voice="your-voice-id",
    api_key="not-needed",  # if no auth is required
    base_url="http://localhost:5002/v1",  # or wherever Coqui is hosted
    response_format="wav"
)
Another option is to build a custom LiveKit TTS plugin by subclassing the
TTS
abstract class and implementing the necessary methods to work directly with Coqui TTS’s API. This way, you get more control and can even enable features like streaming. If you’d like, I’m happy to help you get started—whether that’s creating a simple wrapper API to make Coqui TTS OpenAI-compatible or scaffolding a custom LiveKit TTS plugin. Just let me know! Sources: Text-to-speech (TTS) integrations | LiveKit Docs | examples/other/kokoro_tts.py