chrisjp / tts

A simple tool to demo text-to-speech using various services' voices. HTML5 and Vanilla JS.
https://lazypy.ro/tts
MIT License
68 stars 16 forks source link

Not really a issue but... #15

Closed thetoonsofjosh closed 1 year ago

thetoonsofjosh commented 1 year ago

I'm trying to add the voices from lazypy.ro for use for the Wrapper: Offline software (It's also on GitHub) (I'm using them for the Acapela (They are in the software already but they are not working at the moment as they generate a blank audio file), IBM Watson and Bing Translator voices).

This is what I have so far, this is for tts.js

            case "Acapela": {
                const body = new URLSearchParams({
                    service: voice.source,
                    voice: voice.arg,
                    text: text
                }).toString();

                const req = https.request(
                    {
                        hostname: "lazypy.ro",
                        path: "/tts/request_tts.php",
                        method: "POST",

Requires voices.json

`       "ryan22k": {
            "country": "US",
            "language": "en",
            "gender": "M",
            "source": "Acapela",
            "arg": "ryan22k",
            "desc": "Ryan"
        },

I did tested 2 different requests but when generating a voice from the software, It will result in a socket hang up error.

tts.txt Here is wrapper/models/tts.js (changed it to txt because I can't upload js files on a message) from the software, I'm trying to use the same code as the other speech providers used in the program.

voices.txt and also wrapper/data/voices.json (also changed to txt for the same reason)

And also, TikTok has added 2 new voices based on popular users of their app. "ashmagic" and "olantekkers" 2 weeks ago, Are the voice IDs known? and were there new voices (when I mean that, I meant the International voices) added other than those 2 or is it just those voices?

chrisjp commented 1 year ago

I assume you fixed this? Haven't taken a look at your code but I don't block any kind of requests to the request_tts.php script so it should be returning data (JSON) with those parameters being POSTed.

As for the TikTok voices, yes the English voice IDs of those are known. I have no idea if any others have been added for other languages though. The API call for voice IDs doesn't actually return valid data for a lot of languages and I'm not aware of how to get them properly.

Ash Magic = en_male_ashmagic Olantekkers = en_male_olantekkers