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
Spacemen TTS #68106
Spacemen TTS #68106
Conversation
Oh god it's ready. |
Speedmerge |
Add this permanently as disabled feature by default. I wonder how spells would sound.. |
I unironically like this a lot |
Seperate languages such as felinid are now pointless because TTS reads them in english regardless if you understand it or not |
what do you mean by now? |
Why is that TTS so good wtf |
if you dont know the felinid language for example and someone speaks felinid you wont understand the text but the TTS voice will say it in english so you can just understand felinid language without actually knowing it |
Is one of those voices Keanu Reeves? |
I really want this to be added but I got a few concerns.
|
the tongue tied perk gets very confusing also would people talking on comms be heard |
I'll probably make it only work for GalCom next test.
Like I said, can't /really/ be added.
NovelAI's server, and yes, that's why I've been targetting lowpop. The solution is the same at the 15.ai pr, aka tgui window playing webroot cdn stuff. So it's fixable, but one sad part would be the fact you no longer hear the voices in the environment spoken which I really like. Since I'm not trying to add it permanently, I'm sticking with environmental sounds because I love them.
Indeed it does, for the next text I'll probably remove the list of voices to pick and just let people roll for ones until they like one. |
Oh god its 2013 para all over again |
@@ -50,8 +58,7 @@ | |||
..() | |||
if(say_mod && tongue_owner.dna && tongue_owner.dna.species) | |||
tongue_owner.dna.species.say_mod = say_mod | |||
if (modifies_speech) | |||
RegisterSignal(tongue_owner, COMSIG_MOB_SAY, .proc/handle_speech) | |||
RegisterSignal(tongue_owner, COMSIG_MOB_SAY, .proc/handle_speech, override = TRUE) | |||
tongue_owner.UnregisterSignal(tongue_owner, COMSIG_MOB_SAY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registers signal
immediately unregisters it
not your fault cuz the code was already like this but lol, lmao
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah i see it's some weird signal magic nvm
/datum/preference/choiced/tts_seed | ||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES | ||
savefile_identifier = PREFERENCE_CHARACTER | ||
savefile_key = "tts_seed" | ||
priority = PREFERENCE_PRIORITY_SPECIES + 1 | ||
|
||
/datum/preference/choiced/tts_seed/deserialize(input, datum/preferences/preferences) | ||
//if you figure out how to enter whatever you want than honestly take it idc seeds support that | ||
return ..(input, preferences) | ||
|
||
/datum/preference/choiced/tts_seed/init_possible_values() | ||
return GLOB.tts_seeds_prefs | ||
|
||
/datum/preference/choiced/tts_seed/apply_to_human(mob/living/carbon/human/target, value) | ||
var/obj/item/organ/internal/tongue/tts_speaker = target.getorganslot(ORGAN_SLOT_TONGUE) | ||
if(!tts_speaker) | ||
log_admin("didn't apply tts seed to tongue") | ||
return | ||
tts_speaker.tts_seed = value | ||
|
||
/datum/preference/choiced/tts_seed/create_default_value() | ||
return pick(GLOB.tts_seeds_prefs) | ||
|
||
/datum/preference/choiced/tts_seed/is_accessible(datum/preferences/preferences) | ||
if (!..(preferences)) | ||
return FALSE | ||
return TRUE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can implement a text box preference this way:
/datum/preference/text
abstract_type = /datum/preference/text
var/max_length = 1024
/datum/preference/text/deserialize(input, datum/preferences/preferences)
return STRIP_HTML_SIMPLE(input, max_length)
/datum/preference/text/create_default_value()
return ""
/datum/preference/text/is_valid(value)
return istext(value)
then over in base.tsx for preferences:
export const FeatureTextInput = (
props: FeatureValueProps<string>
) => {
return (<TextArea
height="100px"
value={props.value}
onChange={(_, value) => props.handleSetValue(value)}
/>);
};
export const FeatureShortTextInput = (
props: FeatureValueProps<string>
) => {
return (<Input
width="100%"
value={props.value}
onChange={(_, value) => props.handleSetValue(value)}
/>);
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Fixed that for ya @mc-oofert On a more serious note, I looked up NovelAI and it appears to be a paid subscription service. Is there a free version you're using for this PR or something? |
Someone needs a subscription for this to work, yes. Tests I've run the past few days are at my own expense, haha. |
yikes, how much? |
don't worry, it's not a yikes. it's not pay per generation or I would have lost everything I owned from those like 15 people just spamming "A" in the bar |
There is also a rate limit, that is reached after a few rounds of nonstop tee tee ess. And half of that package would see no use, aka the "use language models" part. So if this were to see any unirony it needs some special discussions with NovelAI itself |
But I'm glad people enjoyed it while it was run |
It is fun. Though a few bugs could be spotted and a bit of qol changes will likely be wanted. Currently the borgs :b chat can be overheard. Might also be the case for drones. I'm unsure if someone speaking another language can be overheard by those who can't understand via tts but is something to check. A way to mute tts for people who would want to play old school or however you would put it. |
One thing is mutes can speak with hands full but i like the idea of saying the gloves have tts |
This is really cool, shame it can't be merged |
Is there any chance there's a free open source tts engine with a similar quality that can be downloaded and run server-end to integrate into SS13? That's the main thing I'm thinking of that could possibly save this. |
I didn't get to play with this on personally but I've seen clips of it and im OBSESSED dude I love this SO MUCH, I HAVE TO SEE THIS IN PERSON please please PLEASE for the love god make a way, ANY way for it to be in the game. Make it disabled by default so that admins can turn it on (they'd have to have a NovelAi subscription of course), or make it entirely client based, like each user who wants to use it has to pay a NovelAi subscription then type in their key and seed in the options menu and it works only for them, hell make it a Patreon goal and I'll fucking fund it 100% by myself I want this THAT bad. It makes the game 1000% better in every way |
We don't get the patreon money :P |
Meant it in a more "make MSO to pay for it with patreon money if the tier is met" way but I'm willing to pay a monthly tax to the head coder (you, mothblocks) if it means we get this thing of beauty |
i'll give an extra dollar if it means i can talk about my minecraft lets play as keanu reeves |
absolutely
no, sadly as far as i'm aware |
If we wanted to do this, we'd need to train our own TTS model from scratch with our own training data and our own server to run it on. It's doable, but only if MSO agrees to host a server for it to sit on and take requests from the game servers. That's also discounting that we'd need to spend money on GPU time to train said model. |
@TheSmallBlue Yeah fair enough I've wanted TTS for years but 99.99% this is going to need to be local. Services like this go offline pretty often from my experience (it having the possibility to go offline at all is a pretty sad loss), and the delay is noticeably huge, even ignoring the pricing (which is in itself subject to the whims of the service). Imagine if, for instance, one day the TTS service goes into a total maintenance mode, and is totally offline for weeks. Or if they change their pricing to be based on per-message rather than whatever it is now, or just raises their prices. We'd have to get rid of it, and people would be significantly more upset by that. |
Ok so, to sum up, here are the possible ways of having this or something like it in a permanent way: Option 1:
A good example of how this would feel to use is the testmerges that happened on manuel already, it'd be like that. Maybe even as often. Option 2:
Option 3:
Option 1 is the most similar to what's currently implemented, except instead of MSO paying for a subcription its a mantainer. It clearly isn't stable, and it's not a good idea to keep using it. Option 2 is the utopic option. If we manage to do it, it'd be awesome to have, but the actual road to getting there is way too complicated to it to be feasible any time soon. Option 3 is the compromise, it's the one I see most likely to happen if anything does actually happen. Though again, I don't know enough about how BYOND works to know if it even makes sense. Would be cool if a design document of sorts about this could be written, I think TTS improves the game to a whole new level and It should be implemented in some way. Also do note that I am speaking mostly out of my ass so if anything I said is stupid and wrong please say so :) |
it's not going to happen |
Oranges if you keep destroying my hopes and dreams I WILL break into tears |
good |
incorrect, we just pay amazon or google for a GPU on the cloud for training, then we run a model in cpu inference mode(after it's been benchmarked to actually handle our 300+ requests a minute on 3 servers) |
Huh, good point. The main issue then would be to find someone willing to pay for training. I also have no idea what cpu interference mode is nor why it'd need to be benchmarked, but it feels like this might actually be possible? It'd be so sick for us to have our own dynamic text to speech synthesizer |
I have a cluster of Single board computers in a kubernetes swarm in my garage. two of them are even atomic pis and pods can access the gpus. I have like 5 computers with decent gpus too. |
honestly, if we could somehow implement a more basic TTS that is doable would be also okay, goofy ass TTS's are funny asf like moonbase alpha one. Also we have the option of waiting some 5 or 10 years so technology evolves and it becomes easier to do it and byond may be possibly less shit, or we are all dead in these 5 or 10 years |
RS also lets you throw a quadro RTX 4000 into the server |
About The Pull Request
Just a little funny experiment, or really, how bone rattling it is to API call from dm. This makes Spacemen speak with TTS, which they pick in character preferences.
spessmentts.mp4
Shoutout to NovelAI for their incredibly impressive TTS model!
Why It's Good For The Game
Really mostly for luls, there are several reasons why this can't be permanently in the game.
Changelog
🆑 NovelAI's TTSv2, Armhulen, Special credits to Iamgoofball for initial exploration of the idea, code to reference, etc
add: Spacemen now speak with TTS.
/:cl: