This page describes the bugs that were found and solved in the CLST-ASR framework from January 2015. It is set up to help solve possible future bugs and is meant as an archive.
DigLin stands for DIGital Literacy INstructor and is a project in which research is done to CALL systems for low literate persons. Systems to facilitate their learning of a second language. The CLST-ASR framework was initially developed in this project and is used to provide feedback on the user's pronunciation. For more info see http://www.diglin.eu
Date: January 30th, 2015
Reported by: Finnish partners
Git commits: 389b15248c39467a63c038c93213af666313b89d, 143e4db24f1681a4a50189b219341da382439b92:
Details:
In the Finnish example exercises 'Vedä kirjaimet (Drag letters) 15' some words could not be recorded and played back. For example the word LÄÄKÄRI which contains characters specific to the Scandinavian language in DigLin. The flash client would hang when such a word was recorded and the play / record button behind every word would stay disabled (while it should be reenabled after recording was stopped).
Cause/solution:
The cause of this was that the file name to which the recording is stored was not encoded in the UTF-8 codeset. Writing the recording to file on disk thus resulted in an exception after which the rest of the recognition process was aborted. No results were therefore returned to the flash client in the browser.
The code responsible for the above is in speech-processor/speechProcessor.py#do_recognition(self) function. The audio_fname variable contains the name of the file to which the recording is written to. The solution was to add “.encode('utf-8')” function when its value is set.
Additionally, the same problem occurred when the recorded wave file is converted to MP3. This is necessary for optimized playback in the Flash client. The LAME MP3 encoder couldn't cope with the 'Scandinavian letters' and the conversion to MP3 resulted in errors. Adding the same “.encode('utf-8')” to the file name parameters of the conversion solved the problem. This was added in the speech-processor/speechProcessor.py#receive_audio(self) function.