Shaunwei / RealChar

🎙️🤖Create, Customize and Talk to your AI Character/Companion in Realtime (All in One Codebase!). Have a natural seamless conversation with AI everywhere (mobile, web and terminal) using LLM OpenAI GPT3.5/4, Anthropic Claude2, Chroma Vector DB, Whisper Speech2Text, ElevenLabs Text2Speech🎙️🤖
https://RealChar.ai/
MIT License
5.94k stars 727 forks source link

dd support for OpenAI / LocalAI TTS endpoint #516

Open zhy844694805 opened 3 months ago

zhy844694805 commented 3 months ago

If it is compatible with the OpenAI API, integrating other applications will become incredibly convenient. Example of using the OpenAI API:

curl https://api.openai.com/v1/audio/speech
-H "Authorization: Bearer $OPENAI_API_KEY"
-H "Content-Type: application/json"
-d '{
"model": "tts-1",
"input": "The quick brown fox jumps over the lazy dog.",
"voice": "alloy"
}'
--output speech.mp3

Reference documentation: OpenAI API Reference - Authentication