p0n1 / epub_to_audiobook

EPUB to audiobook converter, optimized for Audiobookshelf
MIT License
889 stars 86 forks source link

LocalAI Support #17

Open p0n1 opened 7 months ago

p0n1 commented 7 months ago

Split from the issue https://github.com/p0n1/epub_to_audiobook/issues/9#issuecomment-1808120642.

curl http://localhost:8080/tts -H "Content-Type: application/json" -d '{
  "model":"it-riccardo_fasol-x-low.onnx",
  "backend": "piper",
  "input": "Ciao, sono Ettore"
}'

LocalAI TTS API https://localai.io/features/text-to-audio/ is defined even before the release of OpenAI. I think It's not full compatible with OpenAI TTS API https://platform.openai.com/docs/guides/text-to-speech because they are using different voices and models.

So changing the base url of OpenAI SDK to LocalAI instance will not work for TTS feature.

LocalAI supports bark , piper and vall-e-x

If we can support LocalAI, we can support many good local TTS engines at once.

p0n1 commented 7 months ago

However, @mudler from LocalAI said it maybe compatible with the OpenAI client.

https://github.com/mudler/LocalAI/issues/1276

danielw97 commented 2 months ago

Hi there, I'm just curious if there is any update on getting this to work? I would personally love to be able to use local tts with project. Thanks.