Closed karashiiro closed 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.
https://github.com/goatcorp/DalamudPlugins/pull/2158 version 1.12 should resolve this.
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.