LibreLingo icon indicating copy to clipboard operation
LibreLingo copied to clipboard

Voice samples for "Which of these is" exercises

Open kivutar opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe.

Duolinguo can play a voice sample when the user clicks on a card in the Which of these is exercice. I find it useful for languages where the pronunciation is hard to get.

Describe the solution you'd like

In addition to images, we should be able to add voice samples for each options.

Describe alternatives you've considered

Displaying the information using the phonetic alphabet

kivutar avatar Aug 15 '20 15:08 kivutar

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.90. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Aug 15 '20 15:08 issue-label-bot[bot]

Nice! This should be relatively easy, and borderline good first issue material, but also requires changing both JS and Python code.

Frontend side

On the front-end side it's simple, you have to take this logic: https://github.com/kantord/LibreLingo/blob/master/workspaces/web/src/components/ListeningChallenge.svelte#L59

And put in here: https://github.com/kantord/LibreLingo/blob/master/workspaces/web/src/components/OptionChallenge/index.svelte

and here: https://github.com/kantord/LibreLingo/blob/master/workspaces/web/src/components/DeckChallenge/index.svelte

Backend side

The problem on backend is that cards and options exercises don't have audios. Example: https://github.com/kantord/LibreLingo/blob/dfaf25e041e641553d9e14a8b93ab5c19475dbf2/workspaces/web/src/courses/spanish-from-english/challenges/animals.json#L387

This is how the audio property should look: https://github.com/kantord/LibreLingo/blob/dfaf25e041e641553d9e14a8b93ab5c19475dbf2/workspaces/web/src/courses/spanish-from-english/challenges/animals.json#L381

This is also easy to solve, you just have to copy the existing solution from here: https://github.com/kantord/LibreLingo/blob/master/course/management/commands/exportcourse.py#L142

And add it for cards and options exercises, for example here: https://github.com/kantord/LibreLingo/blob/dfaf25e041e641553d9e14a8b93ab5c19475dbf2/course/management/commands/exportcourse.py#L114

kantord avatar Aug 24 '20 21:08 kantord

Has this issue been resolved? If not could I contribute regarding this?

poojadesur avatar Sep 14 '20 15:09 poojadesur

@poojadesur not yet, go for it! See my comment for ideas on implementation.

kantord avatar Sep 14 '20 15:09 kantord

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 18 '21 09:07 stale[bot]