How to recognize a phrase from a voice file

后端 未结 3 1525
被撕碎了的回忆
被撕碎了的回忆 2020-12-18 10:45

How to get the engine to successfully recognize a phrase from a voice file (wav/mp3/etc..)?

For example, if I\'ll have a voice file and a written text of the context

3条回答
  •  有刺的猬
    2020-12-18 11:16

    If you are trying to convert audio files using the Microsoft speech engines, you have to use some care. First, the only format supported is WAV (it can be encoded as PCM, ALaw, or uLaw), but you must verify that your file is in a format supported by your recognizer. You also must verify the sample rate. The recognizers only support a fixed set of sample rates. On my machine,

    • 8 bits per sample
    • single channel mono
    • 22,050 samples per second
    • PCM encoding

    works well. See https://stackoverflow.com/a/6203533/90236 for some more info. You may have to re-sample or re-encode the WAV files using a tool like audacity. See https://stackoverflow.com/a/9467044/90236.

    A simple example to get you started is in SAPI and Windows 7 Problem.

    Last, (I always repeat this point, sorry) there is a great article about programming recognition in Windows .NET. See http://msdn.microsoft.com/en-us/magazine/cc163663.aspx, it is a little out of date, but a great introduction.

提交回复
热议问题