Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9306119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:06:03+00:00 2026-06-19T00:06:03+00:00

Is it possible to programmatically train the recognizer giving .wavs instead of talking to

  • 0

Is it possible to programmatically train the recognizer giving .wavs instead of talking to a microphone?

If so, How to do it?, currently I have the code that performs recognition on the audio in a 0.wav file and writes the recognized text to the console.

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

I understand using the Training wizard is useful to do this

accomplished by Opening Speech Recognition,clicking Start
button->Control Panel->Ease of Access->Speech Recognition

.

How to custom train the speech recognition with custom wav or even mp3 files?

When using Training wizard (Control Panel training UI) training files are stored in
{AppData}\Local\Microsoft\Speech\Files\TrainingAudio.

How can I use or make a custom training instead of using Training wizard?

The Speech Control Panel creates registry entries for the training audio files in the key HKCU\Software\Microsoft\Speech\RecoProfiles\Tokens{ProfileGUID}{00000000-0000-0000-0000-0000000000000000}\Files

Do the registry entries created by code have to be placed in there?

The reason to do this is I want to custom train with my own wav files and list of words and phrases, then transfer all to other systems.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T00:06:04+00:00Added an answer on June 19, 2026 at 12:06 am

    You can generate custom training using SAPI engine (not the managed api)

    Here’s a link on how to do it (though a bit vague)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to programmatically create VPN profile on Android (assuming that I have
Possible Duplicate: Programmatically delete my own app Currently I am working on a iphone
Is it possible to programmatically zip/unzip files in vb.net? Meaning, not that it will
is it possible to programmatically have access open a certain csv file and read
Is it possible to programmatically import code templates in eclipse?
Possible Duplicate: Programmatically create static arrays at compile time in C++ I have lots
Is it possible to programmatically change the android:name attribute in code for Application and
I have a class called MyClass. Is it possible to programmatically find a list
Possible Duplicate: Programmatically scroll a UIScrollView Currently, I am developing an App in which
Is it possible to programmatically change the keyboard type of a uitextfield so that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.