マイクと話す代わりに.wavsを与える認識プログラムをプログラム的にトレーニングすることは可能ですか?SpeechRecognitionEngineをプログラム的にトレーニングし、オーディオファイルをc#またはvb.netのテキストに変換する方法
これはどうすればいいですか?現在、私は0wavファイルの音声認識を実行するコードを持っており、認識されたテキストをコンソールに書き込みます。
Imports System.IO
Imports System.Speech.Recognition
Imports System.Speech.AudioFormat
Namespace SampleRecognition
Class Program
Shared completed As Boolean
Public Shared Sub Main(ByVal args As String())
Using recognizer As New SpeechRecognitionEngine()
Dim dictation As Grammar = New DictationGrammar()
dictation.Name = "Dictation Grammar"
recognizer.LoadGrammar(dictation)
' Configure the input to the recognizer.
recognizer.SetInputToWaveFile("C:\Users\ME\v02\0.wav")
' Attach event handlers for the results of recognition.
AddHandler recognizer.SpeechRecognized, AddressOf recognizer_SpeechRecognized
AddHandler recognizer.RecognizeCompleted, AddressOf recognizer_RecognizeCompleted
' Perform recognition on the entire file.
Console.WriteLine("Starting asynchronous recognition...")
completed = False
recognizer.RecognizeAsync()
' Keep the console window open.
While Not completed
Console.ReadLine()
End While
Console.WriteLine("Done.")
End Using
Console.WriteLine()
Console.WriteLine("Press any key to exit...")
Console.ReadKey()
End Sub
' Handle the SpeechRecognized event.
Private Shared Sub recognizer_SpeechRecognized(ByVal sender As Object, ByVal e As SpeechRecognizedEventArgs)
If e.Result IsNot Nothing AndAlso e.Result.Text IsNot Nothing Then
Console.WriteLine(" Recognized text = {0}", e.Result.Text)
Else
Console.WriteLine(" Recognized text not available.")
End If
End Sub
' Handle the RecognizeCompleted event.
Private Shared Sub recognizer_RecognizeCompleted(ByVal sender As Object, ByVal e As RecognizeCompletedEventArgs)
If e.[Error] IsNot Nothing Then
Console.WriteLine(" Error encountered, {0}: {1}", e.[Error].[GetType]().Name, e.[Error].Message)
End If
If e.Cancelled Then
Console.WriteLine(" Operation cancelled.")
End If
If e.InputStreamEnded Then
Console.WriteLine(" End of stream encountered.")
End If
completed = True
End Sub
End Class
End Namespace
EDIT私はトレーニング・ウィザードを使用して理解
スタート をクリックして開く音声認識によって達成この
を行うことが有益であるボタン - >コントロールパネル - > Access-のしやすさ>音声認識
カスタムwavまたはmp3ファイルで音声認識をトレーニングする方法はありますか?
トレーニングウィザード(コントロールパネルのトレーニングUI)を使用する場合、トレーニングファイルは {AppData}¥Local¥Microsoft¥Speech¥Files¥TrainingAudioに格納されます。
トレーニングウィザードを使用する代わりに、カスタムトレーニングを使用する方法やカスタムトレーニングを行う方法はありますか?
スピーチコントロールパネルのキーます。HKCU \ Software \ Microsoft \スピーチ\ RecoProfiles \ {トークンProfileGUID}で{00000000-0000-0000-0000-0000000000000000を}トレーニングオーディオファイルのレジストリエントリを作成します\ファイル
コードで作成したレジストリエントリをそこに配置する必要がありますか?
これは、私自身のwavファイルと単語とフレーズのリストを使用してカスタムトレインしたいのです。それから、すべてを他のシステムに転送します。