[narrate] Support onecore / mobile voices on Windows 10
Categories
(Core :: Web Speech, enhancement)
Tracking
()
People
(Reporter: asa, Assigned: emk)
References
(Blocks 1 open bug)
Details
(Keywords: parity-chrome)
Attachments
(1 file)
We should support the new-ish Windows 10 voices.
"Previously, you had to use Microsoft's proprietary C++/CX extensions to access WinRT frameworks. Now, there's a thing called cppwinrt (I think?) which makes this stuff all work from standard C++."
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
The full name is C++/WinRT. Documentation:
https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/index
These OneCore voices are accessed via the Windows.Media.SpeechSynthesis namespace. Documentation:
https://docs.microsoft.com/en-us/uwp/api/windows.media.speechsynthesis
Note that while Microsoft still provide SAPI5 voices in Windows 10, you don't get access to all the OneCore voices via SAPI5. OneCore voices include voices for languages not previously supported, among other things.
As an alternative to accessing these via WinRT, There is a hack which allows you to access these voices via SAPI, but it's obviously not official. That said, I think a few apps (perhaps even JAWS?) are using it. This would obviously be a lot simpler than writing completely new code.
- Create an sapi.spObjectTokenCategory object.
- Call .SetID("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech_OneCore\Voices", False).
- Enumerate the tokens with .EnumerateTokens.
- Use those tokens to set your SAPI voice.
NVDA doesn't use this now, but we planned to before I wrote the UWP code. Defunct PR (might serve as a useful code reference): https://github.com/nvaccess/nvda/pull/6166
Comment 2•5 years ago
|
||
Reader mode is just using our web speech implementation, and the Windows implementation there would need to grow this support, then reader mode + the web will automatically benefit.
Assignee | ||
Comment 3•2 years ago
|
||
Now Chrome uses the above Speech_OneCore hack:
https://source.chromium.org/chromium/chromium/src/+/main:content/browser/speech/tts_win.cc;l=52;drc=9ee7ede64d14a26c75f5fe80cc1248e58f01c0c4
Assignee | ||
Comment 4•2 years ago
|
||
Updated•2 years ago
|
Pushed by VYV03354@nifty.ne.jp: https://hg.mozilla.org/integration/autoland/rev/0104ac156fa8 Support Windows 10 OneCore voices. r=eeejay
Comment 6•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•