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

Increase lexicon limit for Amazon Polly #59

Closed karashiiro closed 2 years ago

karashiiro commented 2 years ago

This will inevitably be imperfect, but by comparing the graphemes in a lexicon to the text to be spoken, it should be possible to intelligently set the lexicons for an Amazon Polly request to maximize the number of graphemes that are correctly replaced.

If these graphemes are spread out over more than 5 lexicon files, the number of misses should be minimized.

Alternatively, it might be possible to do dynamic lexicon management, and reshuffle entries between lexicons in AWS to virtually always have every grapheme be replaced. In order to do this, I would need to come up with some sort of dynamic grapheme frequency algorithm to minimize the number of times that these managed lexicons need to be updated.

karashiiro commented 2 years ago

Using SSML directly, it might be possible to use an arbitrary number of local lexicon files, which would sidestep all of this.

karashiiro commented 2 years ago

https://github.com/goatcorp/DalamudPlugins/pull/2158 version 1.12 should resolve this.