Extension:PronunciationRecording/GSoC 2013/Project Updates

From mediawiki.org

Monthly Reports[edit]


In the beginning of the month I was going through the documentation of Mediawiki codebase and the i18n framework. The beginning of the coding period was marked by installing the TimedMediaHandler locally and understanding its working. This was followed by a minor patch submission for "Including audio transcodes in TimedMediaHandler" :

and studying how to write a handler for the WAV file format. Understanding about ID3 tags, RIFF container, WAV file format took some time as it was something new for me. During the course of writing the WAV Handler, we found out that the existing ID3 files were outdated and so I submitted a patch for updating the existing ID3 files. Our plan was to only allow PCM WAV to be uploaded, so for that I wrote a verifyUpload() in the WAV Handler. Matthew's ingenious idea of using "wfDebugDieBacktrace" proved to be very helpful in testing the commit and finally it was merged. In the last week of June I started to work in the direction of "Implementing the Audio Recorder".

Mentor's Comments[edit]

  • In early June (during the Community Bonding Period), Rahul did a good job getting up to speed on MediaWiki and TimedMediaHandler, and continued planning for and designing the pronunciation recording flow. During the coding period, he successfully updated TimedMediaHandler to add WAV support. There were some additional changes required, including updating the ID3 files, and only allowing PCM. All of this was successfully completed by the end of June. I believe he gained a better understanding of MediaWiki extension development in the process. Superm401 - Talk 18:09, 1 July 2013 (UTC)


The beginning of the month was marked by a team meeting with Quim Gil on the 2nd. The first few days of the month was devoted in testing the verifyUpload() in the WAV Handler allowing only PCM WAV to be uploaded. After that we managed to get a repository for our extension and also got some positive feedback on the issue i.e "Allowing WAV uploads to Commons" raised at the Commons Village Pump http://commons.wikimedia.org/wiki/Commons:Village_pump/Archive/2013/07#Adding_.wav_support_to_Commons. I worked on my javascript skills and also learnt jQuery in order to understand the RecorderJS library written by Matt Diamond. Chris Wilson, Developer Advocate at Google helped me understand the code a lot and during this time I developed an understanding regarding Web Workers too. During mid July I started working on developing my "Proof of Concept" by submitting patches https://gerrit.wikimedia.org/r/#/c/73017/ then based on the feedback from my mentors I improved it. I started to develop an extension on top of my POC( Proof of Concept ) so that it could be functional within the MediaWiki Environment, during this time I read the documentation about developing extensions thoroughly and also learnt how to use the "Debug Mode".

I wrote the basic and necessary files for an extension like the README, PronunciationRecording.php, PronunciationRecording.i18n.php, etc. By the end of the month I made a Special Page "Special:PronunciationRecording" which provides a basic toolbar that has 5 buttons "Record","Stop","Preview","Clear" and "Upload"(Not functional yet) https://gerrit.wikimedia.org/r/74413.

Mentor's Comments[edit]

  • Rahul has progressed towards setting up an extension with imported third-party libraries and a correct structure. There is an in-progress special page that will demonstrate recording and local playback, and later uploading. He is attempting to structure the code so it will be cleanly reusable when the recorder functionality is available on other pages (initially, dictionary content pages). Superm401 - Talk 02:58, 3 August 2013 (UTC)


August started with me finishing up the recording part in the Special Page "Special:PronunciationRecording". Then after that I had a discussion with my mentors regarding the next step and outcome was to proceed with the "Upload" Part. For the upload part we decided to depend on the extension "UploadWizard". Did a lot of work in cleaning up "UploadWizard" by breaking the module "ext.UploadWizard" into smaller parts, improving a little documentation.
List of patches for Upload Wizard:

Ran into a lot of complexities that were unexpected, so had to take some time to identify and understand the problems. The work in adding the Upload API can be tracked here :"https://gerrit.wikimedia.org/r/#/c/80128/"
Added the login support to my special page "https://gerrit.wikimedia.org/r/#/c/81503/"


In September( till 24th ) I worked on completing the "Uploading the pronunciation" to the local wiki first. After that was merged I worked on adding the License to the UI and also added a small interface which gathers information for the template in which Commons stores information. After that was merged the next task was to provide a link to File page of the recorded pronunciation, after the recording was uploaded successfully. Also during the course of september various minor changes in the UI after reviews from Matthew were done.

Weekly Reports[edit]

17th June - 23rd June(Week 1)[edit]

24th June - 30th June(Week 2)[edit]

1st July - 7th July(Week 3)[edit]

  • Had our first team meeting with Quim Gil on 2nd July.
  • With the help of Matthew and QChris we got a repository for our extension.
  • Tested the code exhaustively so that it only allows PCM WAV to be uploaded.
  • Got some positive feedback on the issue raised at the Commons Village Pump http://commons.wikimedia.org/wiki/Commons:Village_pump/Archive/2013/07#Adding_.wav_support_to_Commons
  • Worked on my rusty Javascript skills to comprehend the RecorderJS library written by Matt Diamond. Chris Wilson, Developer Advocate at Google helped me understand the code a lot.

8th July - 14th July(Week 4)[edit]

  • Spent the week developing a POC( Proof of concept ).
  • Learnt the jQuery way of selecting, hiding elements instead of the conventional method( Made life easy ).
  • Spent the week mostly learning jQuery and Javascript.
  • Learnt about Web Workers.
  • Got a little stuck up on how to playback the recorded voice, but eventually got through it.
  • Submitted the first few patchsets in https://gerrit.wikimedia.org/r/#/c/73017/ by the end of the week.

15th July - 21st July(Week 5)[edit]

  • Got feedback from my mentors regarding my "Proof of Concept".
  • Spent the week improving the "Proof of Concept" based on the feedback.
  • Read the documentation on how to develop extensions.
  • Started to shape my POC into an extension by adding the README and LICENSE file.

22nd July - 28th July(Week 6)[edit]

  • Started developing a Special Page "Special:PronunciationRecording" which provides a basic toolbar that has 5 buttons "Record","Stop","Preview","Clear" and "Upload".
  • Made files for the extension i.e PronunciationRecording.php, SpecialPronunciationRecording.php, PronunciationReccording.i18n.php.
  • Made different modules and loaded them via the "Resource Loader".
  • Submitted patches in gerrit. https://gerrit.wikimedia.org/r/74413