This is a simple discord bot that can produces mp3's using Open AI's TTS API.
Replace the DISCORD_TOKEN and the OPENAI_KEY key with your keys.
Make sure your discord bot has permissions to attach files.
then run the bot!
Type to the Discord bot in a DM. It will attach an Mp3 of that text in the voice currently selected. It defaults to echo as the starter voice. I use this to create quick MP3's for games or promos
You can change the voice anytime by typing VOICE
in all caps followed by the change you want to make. Example: VOICE alloy
choices are echo, fable, onyx, nova, or shimmer. you can find more info about it here https://platform.openai.com/docs/guides/text-to-speech