Why stardict doesn't support mp3 or other compressed audio playback? Two key restraints are hard-coded:
- filename suffixes such as mp3 and ogg are filtered out.
- gnome_sound_play() accepting only wav formats is called to play audio recordings.
A web post had exposed valid modifications to remove the above restrictions. After performing some verifications on the ubuntu Linux platform, the modifications are rewritten into a distributable form. To apply the changes step by step, all you need to do are:
- download the source code stardict-3.0.1.tar.bz2
- download stardict-3.0.1-mp3.patch and configure.ubuntu
- tar jxf stardict-3.0.1.tar.bz2
- cd stardict-3.0.1
- patch -p1 < ../stardict-3.0.1-mp3.patch
- chmod +x ../configure.ubuntu
- ln -s ../configure.ubuntu
- ./configure.ubuntu
- make
- sudo make install
That's all. But be careful:
- espeak should be installed before configuring stardict.
- stardict has been configured to play audio by an external command, e.g. mplayer which has to be installed beforehand.
- custom audio recordings need to be installed in the same form and location(i.e. /usr/share) specified by stardict.
No comments:
Post a Comment