1

Web サービスを使用せずに音声をテキストに変換することは可能ですか? 次の解決策を試しましたが、Eclipse でライブラリが認識されません

Windows 8 RT には音声認識 API が必要だと思いますか? このプラットフォームに音声認識を実装している人はいますか、それとも正しい方向に私を向けていますか?

これらの方法は、Windows 8 RT プラットフォームでは使用できないと推測しています。

アプリバーのボタンクリックイベントで次のことを試しましたが、メソッド/名前空間が認識されません。

            // Create an instance of SpeechRecognizerUI.
            this.recoWithUI = new SpeechRecognizerUI();

            // Start recognition (load the dictation grammar by default).
            SpeechRecognitionUIResult recoResult = await recoWithUI.RecognizeWithUIAsync();

            // Do something with the recognition result.
            MessageBox.Show(string.Format("You said {0}.", recoResult.RecognitionResult.Text));
4

1 に答える 1

1

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

于 2014-02-04T18:41:00.843 に答える