Speech Recognition UI Settings


This article explains the settings related to the speech recognizer UI. In my last article I explained how to integrate the default speech recognition UI in our App. Now in this article we will see the various settings that we use to customize that UI. So let's start.

Speech Recognition UI Settings

The default UI Speech recognizer supports the following settings:

  1. Example Text

    It's a sample text that is shown on the listening page of the recognizer.

    [SpeechRecognizerUI Object name].Settings.ExampleText="Custom text here"
  2. Listen Text

    This is a heading text that is displayed just above the example text in Listening page.

    [SpeechRecognizerUI Object name].Settings.ListenText="Custom text here"
  3. Readout Enable

    This property sets whether or not the successfully recognized text is to be spoken back to the user on the confirmation page.

    [SpeechRecognizerUI Object name].Settings.ReadoutEnabled=True or False
  4. Show Confirmation

    This setting is related to the confirmation page. If it's set to true then it will show the confirmation page on successful recognition. If it's set to false then the confirmation page is skipped and the recognized result is returned without user confirmation.

    [SpeechRecognizerUI Object name].Settings.ShowConfirmation=True or False

Settings Demo

The following code demonstrates the speech recognizer UI settings:











    FontFamily="{StaticResource PhoneFontFamilyNormal}"

    FontSize="{StaticResource PhoneFontSizeNormal}"

    Foreground="{StaticResource PhoneForegroundBrush}"

    SupportedOrientations="Portrait" Orientation="Portrait"



    <!--LayoutRoot is the root grid where all page content is placed-->

    <Grid x:Name="LayoutRoot" Background="Transparent">


            <RowDefinition Height="Auto"/>

            <RowDefinition Height="*"/>



        <!--TitlePanel contains the name of the application and page title-->

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">

            <TextBlock Text="Demo" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>

            <TextBlock Text="Settings Demo" Margin="9,-7,0,0" FontSize="40"/>



        <!--ContentPanel - place additional content here-->

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">

            <Button Name="startBtn" Content="Start" Click="strtClick" HorizontalAlignment="Left" Margin="10,0,0,10" Width="446" Height="72" VerticalAlignment="Bottom"/>

            <TextBox Name="listTxt" HorizontalAlignment="Left" Height="72" Margin="0,134,0,0" TextWrapping="Wrap" Text="Listen Text" VerticalAlignment="Top" Width="456"/>

            <CheckBox Name="shwConf" Content="Show Confirmation" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,276,0,0" Width="436"/>

            <TextBox Name="exTxt" Height="72" Margin="0,10,0,0" TextWrapping="Wrap" Text="Example Text" VerticalAlignment="Top" HorizontalAlignment="Left" Width="456" />

            <CheckBox Name="readEnab" Content="Readout Enable" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,401,0,0" Width="436"/>





C# Code Behind

using System;

using System.Collections.Generic;

using System.Linq;

using System.Net;

using System.Windows;

using System.Windows.Controls;

using System.Windows.Navigation;

using Microsoft.Phone.Controls;

using Microsoft.Phone.Shell;

using Demo.Resources;

using System.Threading;

using Windows.Phone.Speech.Recognition;


namespace Demo


    public partial class MainPage : PhoneApplicationPage


        // Constructor

        public MainPage()





        private async void strtClick(object sender, RoutedEventArgs e)


            SpeechRecognizerUI mic = new SpeechRecognizerUI();

            mic.Settings.ExampleText = exTxt.Text;

            mic.Settings.ListenText = listTxt.Text;

            mic.Settings.ReadoutEnabled = readEnab.IsChecked.Value;

            mic.Settings.ShowConfirmation = shwConf.IsChecked.Value;

            SpeechRecognitionUIResult res = await mic.RecognizeWithUIAsync();

            if (res != null)


                MessageBox.Show("Text Input: "+res.RecognitionResult.Text);








That's all for this article. Now you can customize the Speech recognition UI to suite your app's needs. In case of any doubt feel free to ask in the comments.