It looks like the SpeechRecognitionUI
class is for Windows Phone 8.
For Windows 8 RT, Microsoft has the The Bing Speech Recognition Control and the class is called SpeechRecognizerUx
.
The Bing Speech Recognition Control enables a
Windows 8
,Windows 8.1
, orWindows RT
machine to convert audio speech input to written text. It does this by receiving audio data from a microphone, sending the audio data to a web service for analysis, and then returning its best interpretations of user speech as text.
The one 'caveat' (if you don't wanna pay) is that this requires a subscription to Windows Azure Data Marketplace, although the free stuff is pretty generous IMO.
The Bing Speech Recognition Control is only available from the Visual Studio Gallery. To develop with the Bing Speech Recognition Control, you must first subscribe on the Windows Azure Data Marketplace, and then register your application. There is no cost to subscribe for the first 500,000 service calls per month.
Here's a code sample.
public MainPage()
{
this.InitializeComponent();
this.Loaded += MainPage_Loaded;
}
SpeechRecognizer SR;
private void MainPage_Loaded(object sender, RoutedEventArgs e)
{
// Apply credentials from the Windows Azure Data Marketplace.
var credentials = new SpeechAuthorizationParameters();
credentials.ClientId = "<YOUR CLIENT ID>";
credentials.ClientSecret = "<YOUR CLIENT SECRET>";
// Initialize the speech recognizer and attach to control.
SR = new SpeechRecognizer("en-US", credentials);
SpeechControl.SpeechRecognizer = SR;
}
private async void SpeakButton_Click(object sender, RoutedEventArgs e)
{
try
{
// Start speech recognition.
var result = await SR.RecognizeSpeechToTextAsync();
ResultText.Text = result.Text;
}
catch (System.Exception ex)
{
ResultText.Text = ex.Message;
}
}
Source: http://msdn.microsoft.com/en-us/library/dn434633.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-4