Closed Bug 1544143 Opened 5 years ago Closed 2 years ago

[narrate] Support onecore / mobile voices on Windows 10

Categories

(Core :: Web Speech, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox68 --- wontfix
firefox106 --- fixed

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++."

Type: defect → enhancement

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.

  1. Create an sapi.spObjectTokenCategory object.
  2. Call .SetID("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech_OneCore\Voices", False).
  3. Enumerate the tokens with .EnumerateTokens.
  4. 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

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.

Component: Reader Mode → Web Speech
Product: Toolkit → Core
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Blocks: 1735537
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/0104ac156fa8
Support Windows 10 OneCore voices. r=eeejay
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: