steam3d / MagicPods-Windows

Add little magic to your Airpods
273 stars 11 forks source link

Add "Natural Voices" to Voiceover options #233

Open TotalChris opened 1 year ago

TotalChris commented 1 year ago

I'm not sure if this is exclusive to Win11, or if there are natural voices on Win10 too, but when I enable a natural voice profile in Windows narrator settings, it doesn't show up in MagicPods as an available voice for voiceover notifications. This would be cool to see!

steam3d commented 1 year ago

Hi. Can you show how to enable it? I can find this on my windows machine.

DarthAV commented 1 year ago

This setting is in the narrator settings seen in the screenshot below. image

However, it does not look like the natural voices show up in the speech section of settings, even if you add them in narrator. image

There might be a different way to access these voices programmatically than the legacy voices.

steam3d commented 1 year ago

Unfortunately I do not have such option. Maybe it is specific option of you laptop?

image

DarthAV commented 1 year ago

Are you able to add the natural voices in this menu: image

image

steam3d commented 1 year ago

I found voice. I will add a task to figure out if it possible to use in external application. This will take a long time because I am making major changes to the logic to optimize the application right now.

andrewcincotta commented 1 year ago

Any updates on this?

steam3d commented 1 year ago

I do not have any good news. I did no find how to add it. If you know third party software that already use it let me know.

steam3d commented 1 year ago

Of course I'm still looking for a solution.

gexgd0419 commented 1 month ago

I found a way to use those natural voices. It may not be a "legit" way, though.

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 encourages most users to use the online versions of Azure AI Speech voices, which have more features, but require an Internet connection, and cost money.

The Narrator natural voices are encrypted with a key which isn't public. But after some investigation, I extracted the key from a system file SpeechSynthesizerExtension.dll. With the correct key, the Narrator natural voices can be used as embedded speech models in the documented way.

Based on that, I wrote a program NaturalVoiceSAPIAdapter that can make Narrator natural voices accessible to all SAPI 5 compatible programs. So if MagicPods supports SAPI 5 voices, you can install NaturalVoiceSAPIAdapter, then use the natural voices in MagicPods.

But as this is not supported by Microsoft, it can stop working after some system update.

If you are using Windows 10 (17763 or above), you can still install those natural voices using these Microsoft Store links.

steam3d commented 1 month ago

@gexgd0419 I use speechsynthesizer. I will check if it supports SAPI 5 voices

gexgd0419 commented 1 month ago

It does. IIRC, the whole System.Speech is a wrapper around SAPI 5.