Tuesday, June 26, 2012

Troy: GSoC 2012 Pronunciation Evaluation Week 5

Sorry for the late update. Following are the stuff done in week 5, mainly problem solving.

1) Solving the Flash based recorder doesn't allow users to enable their microphone access problem. 

At the very beginning (before the Flash player 11.2 and 11.3 update), the audio recorder I created using Flex works fine. Users can simply right click the recorder and select the "Settings" to allow microphone access. However, with the new updates, that option is disabled without giving any information. 

To solve it, many people suggest adding the websites into the online global privacy list. However, after trying many times still not working for my case. 

Furthermore, checking the http://englishcentral.com/ which also is Flash based recording suddenly gives me a clue. In their website, after clicking recording button (which is a microphone image), a popup window shows up with the Flash Microphone privacy setting dialogue. Yes! Instead of finding the problem disabled the "Setting" option for Flash object, why not checking the accessibility of microphone in code and prompt the setting dialogue when necessary. Here comes the solution:

First, checking whether the microphone is available, if not show the microphone list dialogue of Flash object ask the user to plugin a microphone:

var mic:Microphone = Microphone.getMicrophone();

if(!mic) {
Alert.show("No microphone available");
debug("No microphone available");

Otherwise, check whether the microphone is accessible or not, if it is muted, prompt the privacy dialogue to ask user to allow the microphone access:

if(mic.muted) {
debug("Microphone muted!");

With these testing during the initialization stage of the Flash recorder, it can allow users to enable the microphone access at the early beginning. One interesting thing is that after doing this, the "Setting" option of the Flash object now is clickable. 

Now, looking back to the code solving the problem, which is so apparent, however, before you know the answer, it is really hard to predict. 

2) Cross-browser Flash recorder compatibility

As the Flash recorder problem was finally solved using the above method, I was so happy to update the trunk and our server and hoped to see the site working nicely. But the browser shows that the Flash recorder cannot load, the only information I got is "Error 2046". ....

Although rather depressed, I still have to solve the problem. Googled a bunch of pages and tried several suggestions, the one that first clear the browser cache and then set the Flash player not to save local cache and then re-enable its local cache (some kind of clear Flash player local cache), gives some progress by changing the "Error 2046" to "Error 2032". 

For "Error 2032", there are mainly two groups of explanations, one said there are something wrong with the URLs in your Actionscript's HTTPRequests, which is not my problem as those URLs are definitely correct and are under the same folder as the player. The other is the RSL problem of Flash compiler. To solve the RSL linkage problem, go to the "Flex Build Path" properties page, "Library path" tab and change the framework linkage to "merged into code".

3) Adding password change page

4) Refine the user extra information update page to reflect the existing user information if available, instead of always showing the default values.

Till now, the website for exemplary recordings are finally come to a usable stage. 

In this week, I will try to accomplish followings:

1) Prompts adding page for administrators;

2) Design recording prompts to start our exemplary recording data collection;

3) Bug fixing and system testing;

4) Study the Amazon Mechanical Turk and start thinking how to incorporate our recording onto that platform.

No comments:

Post a Comment