The little proxy.php file had become a big mess of if/else statements and a lot of repeated code. This refactoring takes a more OOP stance and makes it significantly easier to add new TTS APIs. Additionally, some improvements and bug fixes are included.
New:
Added StreamElements and made it the default service as it has a lot more voices compared to Streamlabs
More TikTok voices added
Hundreds of Microsoft Azure Speech voices added (via Bing Translator)
Docker compose file included for quickly running your own local copy of the demo site
Basic stats page (won't be particularly interesting unless you're hosting a very public website)
Changes:
Renamed Polly to Streamlabs to more accurately reflect the API being used, and because StreamElements also makes use of Polly voices which could cause confusion
Redesigned playlist page to show full transcript and highlight the text currently being spoken
also fixes the bug where line breaks weren't respected
Automatically add a dialogue box for text entry when at least 1 voice is selected on conversation page
JavaScript now docblocked. Voices JSON and helper functions now split into their own respective files
If saving transcripts alongside audio files it will now be saved as JSON rather than plain text
Bug fixes:
undefined or otherwise erroneous URL parameters are now handled and fallback to a default if necessary
Generated audio URLs will now be served over http if you don't have https set up
I really hope you do have https enabled - this was more for when running a local only instance
Attempts to create AUDIO_DIR if it does not exist.
Failure to save audio locally will not fatally error and instead return the remote URL
The little
proxy.php
file had become a big mess of if/else statements and a lot of repeated code. This refactoring takes a more OOP stance and makes it significantly easier to add new TTS APIs. Additionally, some improvements and bug fixes are included.New:
Changes:
Bug fixes:
undefined
or otherwise erroneous URL parameters are now handled and fallback to a default if necessaryAUDIO_DIR
if it does not exist.