Home › Forums › OpenEars › Using OpenEars in unit tests › Reply To: Using OpenEars in unit tests
Another question for you, Halle.
It would be very useful to be able to write automatic tests that verify any one particular language model recognises pre-recorded segments of speech. However, the only function that is able to perform this task, runRecognitionOnWavFileAtPath:
, DOES NOT RETURN A HYPOTHESIS!
In order for a unit test to verify that a wav file is correctly interpreted as a the expected sentence, the only way I see it being possible is to capture NSLog into a file first (see http://parmanoir.com/Redirecting_NSLog_to_a_file) and then opening that file to make assertions afterwards.
The problem with that approach is that while I can stomach the horribleness, XCode relies on NSLog to be written to the console to provide accurate test reporting so even redirecting NSLog is not an attractive option.
Please return a hypothesis or something so that automated testing can be done. Thanks!