Add ElevenLabs TTS with Multi-Voice Support, OGG Encoding via FFmpeg, and Config Enhancements #1019
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.