Click here to Skip to main content
15,881,027 members
Please Sign up or sign in to vote.
1.11/5 (4 votes)
See more:
How to covert Audio file to word file in vb.net 2010(windows application). Please help me Step by step.
Posted

As suggested by Pheonyx bro above...
Here's your VB.NET code for conversion function.
Redirect the returned string to a TextBox or to a TextFile.
then copy it to your word file

VB
Dim sre As New SpeechRecognitionEngine()
Dim gr As Grammar = New DictationGrammar()
sre.LoadGrammar(gr)
sre.SetInputToWaveFile("YourWavFileLocation") 'you must give full path 
sre.BabbleTimeout = New TimeSpan(Int32.MaxValue)
sre.InitialSilenceTimeout = New TimeSpan(Int32.MaxValue)
sre.EndSilenceTimeout = New TimeSpan(100000000)
sre.EndSilenceTimeoutAmbiguous = New TimeSpan(100000000)

Dim sb As New StringBuilder()
While True
    Try
        Dim recText = sre.Recognize()
        If recText Is Nothing Then
            Exit Try
        End If

        sb.Append(recText.Text)
    Catch ex As Exception
        'handle exception
        'give msgbox about error or etc
    End Try
End While
Return sb.ToString()
 
Share this answer
 
You've clearly done no research on the subject, so here is a possible starting point.

http://stackoverflow.com/questions/17895933/using-system-speech-to-convert-mp3-file-to-text[^]

I suggest you have a look at that (the code is in c# but can easily be converted to vb.net).

Once you have it converting to text then you can put it in a word file.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900