Speech Synthesis
Text-to-speech can be performed with the SpeechSynthesizer
engine in the Windows.Media.SpeechSynthesis
namespace. You give it text to speak, and it produces a standard Windows Runtime audio stream called SpeechSynthesisStream
. This stream implements IRandomAccessStream
(along with many other interfaces), so you can hand it over to a MediaElement
in order to play the produced speech.
The process of turning text into speech requires a “voice.” Microsoft has produced 18 voices that cover 16 different locales. You can see your installed voices in the Text to Speech section in the Windows Control Panel. On my device, I’ve got two voices for the United States (Microsoft David Desktop, a male, and Microsoft Zira Desktop, a female) ...
Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.