SpeechRecognitionUI
クラスはWindows Phone 8用のようです。
Windows 8 RT の場合、Microsoft にはBing Speech Recognition Controlがあり、クラスは と呼ばれSpeechRecognizerUx
ます。
Bing Speech Recognition Control を使用するWindows 8
と、、、、Windows 8.1
またはWindows RT
マシンで音声音声入力を文字テキストに変換できます。これは、マイクからオーディオ データを受信し、そのオーディオ データを分析のために Web サービスに送信し、ユーザーの発話の最適な解釈をテキストとして返すことによって行われます。
1 つの「警告」(支払いたくない場合) は、これには Windows Azure Data Marketplace へのサブスクリプションが必要なことですが、無料のものはかなり寛大な IMO です。
Bing 音声認識コントロールは、Visual Studio ギャラリーからのみ利用できます。Bing Speech Recognition Control を使用して開発するには、まず Windows Azure Data Marketplace でサブスクライブしてから、アプリケーションを登録する必要があります。1 か月あたり最初の 500,000 回のサービス コールについては、サブスクリプション費用はかかりません。
これがコードサンプルです。
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;
}
}
ソース: http://msdn.microsoft.com/en-us/library/dn434633.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-4