User Tools

Site Tools


solved-bugs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
solved-bugs [2015/02/24 08:44]
mganzeboom created
solved-bugs [2015/02/24 09:34] (current)
mganzeboom
Line 6: Line 6:
  
 ==== Cannot record and playback certain words in Finnish ==== ==== Cannot record and playback certain words in Finnish ====
-**Date:** January 30th, 2015 +**Date:** January 30th, 2015\\ 
-**Reported by:** Finnish partners +**Reported by:** Finnish partners\\ 
-**Git revision:**  +**Git commits: 389b15248c39467a63c038c93213af666313b89d, 143e4db24f1681a4a50189b219341da382439b92:** \\ 
-**Details:** +**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). +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:**+**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 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. +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. 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.
solved-bugs.1424763896.txt.gz · Last modified: 2015/02/24 08:44 by mganzeboom