DuncteBot / skybot-source-managers

Apache License 2.0
2 stars 0 forks source link

Feature request. Make tts language variable #1

Open DaliborTrampota opened 2 years ago

DaliborTrampota commented 2 years ago

instead of speak:\<some text>

it could be speak:\<language code>:\<text> or speak:\<lanugage code>_\<text>

duncte123 commented 2 years ago

I hate both of those implementations. I'll think about it but it would probably be something along the lines of what I did for this plugin: https://github.com/DuncteBot/tts-plugin#simple-usage

DaliborTrampota commented 2 years ago

What you "hate" about those? its clear and simple but okay, its your plugin :)

duncte123 commented 2 years ago

Well first of all this is not a plugin ;)

What I hate about them is that they incorporate items that could be used within natural language, meaning that just splitting on them is highly error-prone and will produce the wrong result more often than not.

DaliborTrampota commented 2 years ago

Its just about checking first 3 characters. first two being country code, 3rd being : or _ but okay i see.

duncte123 commented 2 years ago

oh, I see, my tired mind thought that those two were the other way around. That's a bit more feasible. Personally, I would still prefer the URI format but this actually does work.

duncte123 commented 2 years ago

Oh and it's not the country code, it's that ISO language code standard en-GB and de-DE you name it

DaliborTrampota commented 2 years ago

I was playing with the stream url myself but I couldnt figure out how to change the narrator voice. Is it possible? or thats only for the paid api?

duncte123 commented 2 years ago

There is 0 customisation for this version of the implementation as it uses the google translate endpoint.

The paid version is free up to a million characters a month iirc

DaliborTrampota commented 2 years ago

in that case thats quite cheap. 4$ per million https://cloud.google.com/text-to-speech/pricing thats good. Imma go with the paid one

DaliborTrampota commented 2 years ago

Any eta when the change will be coming? I wanna use the free one after all, dont wanna risk anything with google, I dont have good experience with them

duncte123 commented 2 years ago

The ETA is: when I have the time to add it. I'm a full-time student atm so free time is kinda non-existent for me

DaliborTrampota commented 2 years ago

i understand, im full time student myself. Thanks though