Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ElevenLabs TTS with Multi-Voice Support, OGG Encoding via FFmpeg, and Config Enhancements #1019

Open
wants to merge 4 commits into
base: 1.20.1
Choose a base branch
from

Conversation

BinaryGun951
Copy link

This pull request enhances the project with ElevenLabs Text-to-Speech (TTS) support, adding multi-voice selection, audio encoding, and configuration improvements:

ElevenLabs TTS Integration: Added TTS functionality that utilizes the ElevenLabs API for in-game voice playback. The implementation includes support for six unique voice IDs (three per gender), allowing diverse, configurable voice output based on input parameters.

Gender-Based Voice ID Selection: Implemented logic to dynamically assign voices based on the gender and characteristics of the voice request. This setup provides three distinct voice IDs for both male and female options, chosen based on the last character of the provided string.

FFmpeg-Based MP3 to OGG Conversion: Added a method to convert downloaded MP3 files to Minecraft-compatible OGG format using FFmpeg. This conversion sets bitrate, sample rate, and channel properties for optimized in-game playback.

Configurable Settings: Expanded configuration options to include ElevenLabs API keys and additional parameters, making TTS settings customizable for each user.

These additions enable dynamic voice integration with diverse male and female TTS voices, along with optimized audio handling and configurable options.

@Luke100000
Copy link
Owner

Nice!

Please revert changes to name jsons :)

You need ffmpeg for conversion only, right? Can you skip this by requesting raw pcm_24000, then converting it to wav by appending the 44 bytes header? https://stackoverflow.com/questions/21131595/convert-from-pcm-to-wav-is-it-possible

@BinaryGun951
Copy link
Author

I'll try my best ,, and i already revert changes to name jsons in the last commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants