[kde-edu]: [RFC patch] audio play for kwordquiz

Peter Hedlund peter at peterandlinda.com
Sun Jan 24 21:50:05 CET 2010

Hello Stanislaw,

Thank you for your contribution. This will be a most welcome addition.

I do, however, have some thoughts and comments. 

First, please use http://reviewboard.kde.org as we continue to develop this 

On Sunday 24 January 2010, Stanislaw Gruszka wrote:
> Hi
> I would like to add playing audio files for kwordquiz. To achieve that
> I copied Phonon playback code from parley to kwordquiz. Patch do not play
> url taken from kvtml file however, instead audio file path is crated from
> word/language pair:
> KStandardDirs::locateLocal("sound", "kwordquiz/") + lang + "/" word + .ogg
> in my system this is
> $HOME/.kde/share/sounds/kwordquiz/lang/word.ogg"
> User have to put ogg file in roper dir (I have a dump script for that).

I am not convinced about this design. As you say we should use the 
keduvocdocument sound url. I suggest adding "Attach Sound File..." to the 
Vocabulary menu.

Once the basics are in place we should probably provide a visual hint in the 
editor for entries that have associated sounds.

Also, as a more general comment, the aim of KWQ is to be a general purpose 
flashcard program, and thus I have tried to avoid nomenclature that specifically 
imply language learning.

> Play sound is only implemented for qaview.

Adding to Flashcard should be trivial. Maybe less relevant for Multiple 

> - first check if kvtml have defined sound file before playing word/lang
> - configuration to chose playing answer or question or desired
>   language, currently only answer is played
> - same behavior (file path from word/lang) for Parley ?

I suggest grouping the Play action with the Hint action.

There shouldn't be any hard coding of ogg.

The caption should be "Play Audio"

Ctrl+P is almost universally (and also in KWQ) used for Print. One possibility 
is Ctrl+U.

"Play sound file with word pronunciation" implies language, maybe "Play 
associated audio"

<kpartgui version="18" name="kwordquiz">, version should be incremented every 
time this file is changed. Otherwise, thank you for updating this file.

I look forward to continue this work. After this it will be simple to also add 
support for images.


More information about the kde-edu mailing list