An automatic system for detection of pronunciation errors by adult learners of English is embedded in a language learning package. Four main features are: (1) a recognizer robust to nonnative speech; (2) localization of phone and wordlevel errors; (3) diagnosis of what sorts of phonelevel errors took place; and (4) a lexical stress detector. These tools together allow robust, consistent, and specific feedback on pronunciation errors, unlike many previous systems that provide feedback only at a more general level. The diagnosis technique searches for errors expected based on the students mother tongue and uses a separate bias for each error in order to maintain a particular desired global false alarm rate. Results are presented here for nonnative recognition on tasks of differing complexity and for diagnosis, based on a data set of artificial errors, showing that this method can detect many contrasts with a high hit rate and a low false alarm rate.