Project preferably has to be done with Python 2.7 or Python 3.4 (but you can use [url removed, login to view], C#.net as well, but no other languages please).
Read a clear audio file in python using SpeechRecognition library [url removed, login to view]
And a string of words.
(The audio file has a very clear voice, speaking the same sentence as provided in the string).
We just have to map the parts of audio with each word.
So, for example, the string is "i have a baby mitten".
The script will read the string and audio, and return something like:
word="i" begin=100ms end=175ms
word="have" begin=215ms end=265ms
word="a" begin=265ms end=285ms
word="baby" begin=325ms end=400ms
word="mitten" begin=400ms end=450ms
begin and end mean the start and end of the word in the audio file.
Even though I mentioned SpeechRecognition library above, you are free to choose any libraries at all.
As a coder myself, I can suggest one approach to implement an algorithm to map, although I am not sure if it will work and be accurate. Here is the approach:
There are some pauses in between some words and no pause in between other words at all.
So, for example, if the string is "i have a baby mitten", in the audio, there can be pauses as show below:
"i <pause> have a <pause> baby mitten".
Now, we can slice the audio in chunks around the pauses so that first chunk of audio is "i", second chunk is "have a", and third chunk is "baby mitten". We trim each chunk so that it doesn't have any leading or trailing pauses. Now we parse each chunk into the speechrecognition library. If the speechrecognition library outputs a single word for a chunk, we just match word with words in string, and map the chunk of audio with that word in the string. Otherwise if the speechrecognition produces multiple words, then we can loop through the chunk's length to locate a partition so that the speechrecognition library produces 1 word for the sub-chunk from start to the partition position of the bigger chunk. And once the partition for 1 word is found, we locate the word in the string of unmapped words and map it with it. And so on.