Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
See more:
How can a spoken word can be compared with an audio file?Consider a case,I say "This is an example" by microphone and save it as a .mp3 file.Then i will save it in a database.Then when my application will run,if i say "This is an example" it can detect that by comparing with that audio file from database and write those words if compare is succeed.
Posted
Updated 6-Aug-12 1:42am
v2
Comments
Bernhard Hiller 6-Aug-12 9:01am    
You describe a very odd workflow. Hence I want to ask: do you actually want to do something else? E.g. identifying a user by his voice?

yes you can,
.Net Provides dll for this,
for reference code see,http://msdn.microsoft.com/en-us/library/system.speech.recognition.speechrecognizer.aspx[^]
Happy Coding!
:)
 
Share this answer
 
Comments
ridoy 6-Aug-12 13:03pm    
Thanks for your reply.But if i want to do it in different language(ex.Bengali as I'm Bangladeshi)does it possible?windows speech recognition engine will allow it?
Aarti Meswania 6-Aug-12 13:24pm    
Microsoft OS is world-wide so, It supports different cultures, when we install OS it's asking for selecting 'language/culture'.
I haven't try such kind of code, but Speech-recognizer class have culture-info Property, that means it is possible to work with different languages. please refer http://msdn.microsoft.com/en-us/library/ms554259.aspx
Try that, may it be useful to solve the problem.
First, include the System.Speech library.
My code, for a console application, is the next:

C#
// default using statements
// then import System.Speech.Recognition namespace
using System.Speech.Recognition

namespace SpeechRecognition
{
     static class Program
     {
         static void Main(string[] args)
         {
               SpeechRecognizer sr = new SpeechRecognizer();
            sr.LoadGrammar(new Grammar(new GrammarBuilder("First test")));
            sr.LoadGrammar(new Grammar(new GrammarBuilder("Second test")));
            sr.SpeechRecognized += new EventHandler<speechrecognizedeventargs>
                 (sr_SpeechRecognized);
         }
         static void sr_SpeechRecognized(object sender,
                   SpeechRecognizedEventArgs e)
         {
              Console.WriteLine(e.Result.Text);
         }
     }
}

When you say "First test", you'll find "First test" on the console.
When you say "Second test", you'll find "Second test" on the console.
 
Share this answer
 
v2
Comments
Kenneth Haugland 6-Aug-12 13:59pm    
Yes, a 5 :)
The most important information was provided as a comment to an answer only: "different language - Bengali".
Why is this the most important info?
Speech recognition starts with retrieving "phonems" from the audio stream. The phonems available - and their exact pronounciation - differs between languages.
Next, it tries to build words from the phonems. The words have to be present in a dictionary. Of course, different languages have different words.
Next, words are combined into phrases. A lot of statistical information on combined word occurencies is required for that. That depends not only on the language, but also on the specific context (legal, medical, ...).
Consequently, only those languages can be supported the speech recognition egine was built for.
 
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