That was the same topic of my Graduation Project, I am not yet sure of the best way to do it as this matter is still a research matter, but what my team and I did was as follow:
1- Provide a database representing the features of the right pronunciation of each word. This database contains for each word around 10 different features for 10 different people reading this word.
2- Get the features of the input word ie. a .wav file representing the word
3- compare the features of the input word with the 10 features representing the right pronunciation of the word
To get the features, you will need to get the MFCC file a .wav file containing the word pronounced
The MFCC is a matrix of numbers, so to compare 2 MFCCs, you will need to use dynamic programming algorithm, in our case we've use Dynamic Time Wrapping algorithm.
You might also need to make a filtering on the input words to filter them from noise.
You might also need to check for the following programs:
Praat >> to make a filtering if needed, and also can be used to make MFCC file
SPPAS >> to get the feature of the .wav file (MFCC)
Matlab >> to compare 2 MFCC files
Hope this can help