karashiiro / TextToTalk

Chat TTS plugin for Dalamud. Has support for triggers/exclusions, several TTS providers, and more!
MIT License
47 stars 30 forks source link

Add support for more NPC fields #200

Closed Cidan closed 6 months ago

Cidan commented 6 months ago

Hi there,

Thank you so much for the plugin! I'm using the websocket server and doing some custom processing, and it would be really great to get some more NPC data in each message, such as most things in CustomizeIndex. The reasoning here is we can make some more intelligent decisions off of this data and generate more accurate voices.

For example, a short Hyur might be considered a child and have a voice generated as such. A Lalafell on the other hand can have different scaling, etc.

I took a look at the code, and it doesn't seem like it's tooooo hard to add, though a lot of the calls that lead up to the websocket implementation are heavily parameterized, which doesn't make it as easy as just adding this data to a class of some sort.

Any hopes of this extra information being supplied?

karashiiro commented 6 months ago

Refactored the code, how easy would it be to add now?

It's not quite one class unfortunately, it's adding a field to SayRequest, and then adding a corresponding field to IpcMessage' for serialization.IpcMessageMapperhandles converting between them mostly automatically, but might need a bit of customization if the serialization-safe version is too different from whatSayRequest` has.

Cidan commented 6 months ago

You read my mind -- I was just looking at exactly what this refactor did. I'll take a stab it it -- looks like I'll start by adding it to Say in TextToTalk.cs, fed into BackendSay. Let me see what I come up with.