karashiiro / TextToTalk

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

Support Windows 11 Natural Voices #121

Open rechington opened 2 years ago

rechington commented 2 years ago

In the Windows 11 Insider Preview there are new natural voices available but they do not show up in the plugin. I assume these might use some new stuff behind the scenes so maybe it's not even possible. But it would be really nice if we could use them.

karashiiro commented 2 years ago

I don't have Windows 11 on my main computer (and my W11 laptop is out of disk space for the game), but if anyone does have an environment and can look into this a PR would be welcome 👀

rechington commented 2 years ago

To add additional info (I am very much a development noob) searching around in regedit it seems these voices are installed as an appx program. There are more things related to the voices in the WindowsApps folder:

C:\Program Files\WindowsApps\MicrosoftWindows.Voice.en-US.Aria.1_1.0.6.0_x64cw5n1h2txyewy C:\Program Files\WindowsApps\MicrosoftWindows.Voice.en-US.Guy.1_1.0.2.0_x64cw5n1h2txyewy C:\Program Files\WindowsApps\MicrosoftWindows.Voice.en-US.Jenny.1_1.0.6.0_x64__cw5n1h2txyewy

There is a Tokens.xml and some .dat files in these folders that seems similar to what the "Enable all system voices" registry tweak does (or maybe not, I have no idea).

If dumping these folders could help I would gladly provide them.

karashiiro commented 4 months ago

Didn't update here, but a while back I tried loading those voices by copying the data from the Natural Voice files into the registry, that didn't work, though. The data formats are also slightly different between the two systems, and the new Natural Voice format seems to be missing some things compared to the old format.

Also possibly relevant: https://github.com/nvaccess/nvda/issues/13288

gexgd0419 commented 2 months ago

Microsoft hasn't allowed third-party apps to use those natural voices yet.

The Narrator natural voices are offline (embedded) versions of Azure AI Speech voices. Microsoft limits third-party access to embedded speech models, and requires submitting an application form if you want to use them. Obviously, Microsoft wants most users to use the online version, which costs money.

However, @rechington if you want to have a try, here's my program called NaturalVoiceSAPIAdapter. After installation, it can make Narrator natural voices accessible to all SAPI 5 compatible programs. If TextToTalk supports SAPI 5 voices, the natural voices will be in the voice list.

Also, the minimum system version requirement for the Narrator natural voice packs is Windows 10 17763, so you can even install those voices on Windows 10, as long as you have the Microsoft store links.

rechington commented 1 month ago

I was able to test it now and NaturalVoiceSAPIAdapter allows me to select natural voices in the plugin. Very cool, thank you!

Microsoft hasn't allowed third-party apps to use those natural voices yet.

The Narrator natural voices are offline (embedded) versions of Azure AI Speech voices. Microsoft limits third-party access to embedded speech models, and requires submitting an application form if you want to use them. Obviously, Microsoft wants most users to use the online version, which costs money.

However, @rechington if you want to have a try, here's my program called NaturalVoiceSAPIAdapter. After installation, it can make Narrator natural voices accessible to all SAPI 5 compatible programs. If TextToTalk supports SAPI 5 voices, the natural voices will be in the voice list.

Also, the minimum system version requirement for the Narrator natural voice packs is Windows 10 17763, so you can even install those voices on Windows 10, as long as you have the Microsoft store links.