using Windows.Phone.Speech.Recognition; using Windows.Foundation
namespace txtspeech { public partial class MainPage : PhoneApplicationPage { // Constructor public MainPage() { InitializeComponent(); this.syn = new SpeechSynthesizer(); } private IAsyncAction task; SpeechSynthesizer syn = new SpeechSynthesizer(); private void Read_Click(object sender, RoutedEventArgs e) { syn.CancelAll(); task = syn.SpeakTextAsync("hello"); } } }
namespace samplespeech { public partial class MainPage : PhoneApplicationPage { // Constructor public MainPage() { InitializeComponent(); } SpeechSynthesizer synth; private async void Button_Click(object sender, RoutedEventArgs e) { synth = new SpeechSynthesizer(); await synth.SpeakTextAsync("input TextBox"); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)