https://www.duolingo.com/Latcarf

Userscript: Reverse Tree Enhancer

Have you been using a reverse tree to learn a language not yet available on Duolingo as a regular tree? Or maybe you like the challenge of having to write more in your target language than in your source language, and having to use unfamiliar grammar unexpectedly? And are you annoyed that there is no audio or listening exercices for reverse trees?

Then install my userscript (direct link), disable speaker and mic in Duolingo’s options (in order not to have audio and speaking/listening exercices in your source language), click the “Is this a reverse tree?” button at the top of your reverse tree and enjoy! (Shift-space to play the sound again).

Before clicking:

After clicking:

I’ve been learning Polish (from scratch) through the reverse tree for 3/4 months now (I recently passed the third of the tree) and I got quickly annoyed by the absence of audio and of listening exercices, so I decided to write a script turning most exercices into listening exercices. As I thought it would probably be useful for other people, I cleaned it up and made it independent of the languages and I’m now ready to share it with you. In the description that follows I will use the reverse Polish tree as an example, but the script should work with all (most?) trees. I have tried it with a few other trees, but not all of them, so don’t hesitate to let me know if there is a problem with some language.

The general idea is that whenever there is some Polish in the exercice, I will say it through Google Translate’s TTS and hide it on the page, so that you have to understand what was said.

For instance when you have to translate from Polish to English, instead of showing the Polish text on the left, you will be shown a big gray box and be asked you to translate what you’ve heard instead. You will see the Polish text afterwards, whether you have it right or wrong. Don’t forget that you have to translate, it happened several times to me that I was just transcribing what I’d heard and of course my answer was wrong.

Similarly for exercices where you have to translate a single word, with images picturing it, it will hide both the Polish word and the images (it would be too easy to have to type “apple” when seeing an image of an apple) say the Polish word and ask you to type the English word.

For multiple-choice questions, I find them usually way too easy because most of the time only one of the three sentences makes any sense (even more so when they are written in English, your source language), so I decided to hide everything (the Polish sentence you have to translate and the three English suggestions), so that you only have the TTS audio to try to figure out what was said. Of course you still need to see the English suggestions in order to choose the right one, so they will be displayed whenever you’re passing the mouse over them.

And similarly for multiple-choice questions where you have to choose an image.

Finally, after sometime of using it I noticed that Google Translate’s TTS eventually gets tired of speaking and requires you to type a captcha to continue, so every once in a while you will see the error message below. Just click on “here”, solve the captcha in the new tab, then click on “Done” and you can continue.

You can play the audio again using Shift-space (as Ctrl-space is already taken by Duolingo for playing the English).

The code is available on GitHub here and feel free to tell me if you have comments, suggestions, bug reports, etc.

I hope this will be useful to some of you! :-)

October 9, 2015

100 Comments


https://www.duolingo.com/skuggstralar

I've only been using your script for around ten minutes, but I'm already finding it invaluable and can't imagine attempting the Polish tree without it! It seems I'm having a lot of difficulty recognising words with ę and ą - I'm glad I'm finding this out at a very early stage. Plus the audio comprehension is already making it easier to remember conjugation patterns... my days of spending ten minutes trying to remember ptakiem vs. ptakami may finally be over! :)

It seems like a lot of hard work went into that script (computers mostly seem like magic to me). You've done a great job and I'm sure it'll help a lot of people using reverse trees.

October 9, 2015

https://www.duolingo.com/wchargin

This is wonderful. Thank you. Take my lingots!

A bit of feedback: I ended up removing the bits to hide the target language text in most cases (except for the pictures ones). This is obviously personal preference, but it would be awesome if—for non-developers—you also patched /settings/account to allow users to choose which exercise types to hide!

October 10, 2015

https://www.duolingo.com/Lelieblad

This is great! I was literally just lamenting the fact that Duolingo has chosen to make reverse trees your only option if you want to seriously work on word recall.

Thanks for making using reverse trees in this way easier! :)

October 9, 2015

https://www.duolingo.com/flootzavut

Ohhhhh I can't wait till tomorrow when I can install this on my laptop - I only wish these user scripts could be used on mobile. You're brilliant, have yet another lingot!

October 9, 2015

https://www.duolingo.com/flootzavut

Now all I have to do is either find a phonetic keyboard or learn the йцукен one on an English keyboard 8-o but this is brilliant, thank you, спасибо!

October 10, 2015

https://www.duolingo.com/flootzavut

Additional: Would it be possible to take out the "complete the sentence" exercises? Like, making me choose the right form of "drink" to go with "I"? I have no idea how difficult or easy it is to change stuff like that, it just seems like those exercises aren't valuable to an English speaker (or whichever target language a person is using).

October 10, 2015

https://www.duolingo.com/Latcarf

I completely agree that those exercices are useless, unfortunately I don't think I can get rid of them. It is the server which is choosing the exercices and I have no way to change that... They don't seem to happen very often though (at least in the Polish tree, maybe it's different in the Russian one).

October 10, 2015

https://www.duolingo.com/flootzavut

Oh, right, okay - I wasn't sure. I'm really quite a dunce when it comes to these programming things! I think maybe I was just unlucky to get several in one lesson ;p

It is fantastic, though - thanks for the work and thought you put into this!

October 10, 2015

https://www.duolingo.com/cherub721

Wow, this is absolutely fantastic! Hands down the best userscript I've ever used. It worked really seamlessly. I already finished the English to Russian tree, and man, how I wish I had had this while I was doing it. But I did that mostly through the app, so redoing lessons using this script while waiting for the Russian course to come out will be fun, and I have been thinking about dabbling in Greek for a while. :D

October 10, 2015

https://www.duolingo.com/Katzenperson

Hello! I hope you will find time to update this script to use at the new Duolingo site. It went live recently, and all userscripts are broken. This one was utterly invaluable to me.

May 2, 2017

https://www.duolingo.com/Thomas.Heiss

The "DuoLingo tree enhancer" user script from Camilo, which is also working for playing audio (e.g English->Portuguese questions in forward tree courses on right hand side L2 answers and being able to read multiple-choice L2 answers (please see my comment at the bottom of this thread"), has been successfully updated for the new DuoLingo 2017 portal code: https://www.duolingo.com/comment/19654789$comment_id=23151134

June 19, 2017

https://www.duolingo.com/Latcarf

It is still working for me, and I don’t see any difference in the website. Maybe there is an A/B testing for the new website, in which case it will have to wait until I have the new website.

May 3, 2017

https://www.duolingo.com/Katzenperson

All right, thank you. I definitely have the new website, and the script does not work. I miss it terribly, and I look forward to the update.

May 3, 2017

https://www.duolingo.com/HappyEvilSlosh

I'm also eagerly awaiting an update. :)

May 27, 2017

https://www.duolingo.com/peraperanaperoni

Same here. New website, script doesn't work.

May 23, 2017

https://www.duolingo.com/Latcarf

For those who are waiting for a new version, unfortunately I’ve been very busy and I will now be travelling without a computer, so I won’t be able to update it until August at the earliest. I suggest you take a look into the "DuoLingo tree enhancer" user script mentioned above. I haven’t tried it yet, but there is no doubt that it is better than nothing.

June 19, 2017

https://www.duolingo.com/Latcarf

For everyone using my script, I advise you to regularly check for updates (Tampermonkey for Chrome has a "Check updates" button, and Greasemonkey probably too), follow the repository on GitHub, or just reinstall it regularly (the link at the top of the post will always point to the latest version, so you can just click on it again and it will update the script).

In particular, I fixed a few days ago an encoding problem giving (at least in some cases) a very strange pronunciation for French accented letters.

Another remark is that if you are learning a language with special diacritics (you probably are), you really should find out how to type them on your keyboard and try not to forget them. The issue is that Duo won’t warn you for missing accents (I guess it considers that you speak the language so it’s not very important to annoy you with that), but then when giving it to Google Translate the pronunciation might be completely wrong (and I have no way to fix it as Duolingo says it’s correct so I can’t figure out whether you’re missing diacritics or not).

October 31, 2015

https://www.duolingo.com/Bellatrix86

In Greasemonkey you can even activate automatic updates, even on a per script basis! You find it in the Greasemonkey tab (under Addons) when you click on "more" (at least in German it's "mehr") under each individual script. But I think this is usually activated as a default setting as well.

November 2, 2015

https://www.duolingo.com/snadhelta

Brilliant; thank you. I'm excited to use this for Indonesian.

October 10, 2015

https://www.duolingo.com/sigmacharding

You sir are a kind genius! dziekuje bardzo

October 12, 2015

https://www.duolingo.com/MalloryBlaise

Wow, this looks fantastic - can someone tell me how to install it? Does it work on Chrome?

October 15, 2015

https://www.duolingo.com/wchargin

Yep, it works on Chrome! First, install the Tampermonkey extension. Then, just click the link from the original post and press "Install" when prompted.

October 15, 2015

https://www.duolingo.com/Bellatrix86

One week later and I'm still extremely happy about this. ;-)

Since I know that you're following this thread, I have a little request if it's possible. It's about the type of exercise that you have in your first picture, when you have to translate the Polish text into English and the original text is now hidden so that we can only go by the audio. Would it be possible to not hide this text completely but instead have it appear while passing the mouse over it, like in the multiple choice and image exercises?

To explain why I would like this: I'm learning French though the German from French tree right now. French has some examples in its language where you can't hear a difference between different words, you only know when written or have to figure it out by meaning. I never thought about it before but now I noticed even German has them. When DL creates a listening exercise they plan accordingly, offer all the different meanings as possible translations. But now if this word comes up in a written sentence, you're of course supposed to see and recognize it. Only one answer is acceptable. But we can't see it. So it would be great if I could go over it and reveal what's written there when necessary. But still have it hidden by default as it is now.

October 27, 2015

https://www.duolingo.com/Latcarf

Makes perfect sense, I didn’t think about it as it doesn’t seem to happen much in Polish, but I’m French and I know it can happen quite a lot in French. The problem of having it appearing when passing the mouse over it is that it’s too easy to do it by mistake. Maybe it should instead appear only when we click on the grey box? Or have a button somewhere?

October 29, 2015

https://www.duolingo.com/oskalingo

Yes, I've also encountered this when doing the fr/en tree. I'd suggest having it show when you click on the box.

Like Bellatrix, I'm very happy with the script and this is the only small issue I've encountered. It's making the reverse tree a far more valuable learning experience.

October 29, 2015

https://www.duolingo.com/Bellatrix86

Both sound like perfect solutions. I would be happy with whatever you chose. :)

October 29, 2015

https://www.duolingo.com/Latcarf

Fixed. Now when you click on the big grey box it will show the text and then hide it again as soon as you move the mouse out of it. Of course I suggest using this feature only when you have understood the spoken text and know that it can have two different interpretations, otherwise it’s cheating :P

October 31, 2015

https://www.duolingo.com/Bellatrix86

Works like a charm! And even no more captchas. Thanks for all the work you're putting into this!

November 2, 2015

https://www.duolingo.com/Bellatrix86

This is absolutely fantastic!!! Brilliant! Amazing!

I had to wait for "my" reverse tree to finally go into beta (which happened just now!) so I could try it out. I love it! And I'm glad that I can now start this tree together with this script. Thank you so much! :)

One more exercise that would be great to change would be the "listening to a word in the target language and then writing it". Especially because the audio is extremely slow in these cases, which makes it totally annoying. If the audio could be in the source language instead, that would be great. But I'm not sure if it's possible for you to work on this type of exercise because there is no written text in the source language.

October 14, 2015

https://www.duolingo.com/wchargin

Wait, you want to hear the text spoken in the language you already know? I'm not sure I follow.

October 14, 2015

https://www.duolingo.com/Bellatrix86

No, the other way around. Right now, in this type of exercise, you get the audio in the language you're supposed to learn (target language) (not the one you want to learn if you do a Reverse Tree). Then you have to write it in this language that you're supposed to learn.

I wish it was was possible to hear the audio in the source language of the course instead of the target language.

(source, target, from this to there or from there to that, ... all so confusing ^^)

October 14, 2015

https://www.duolingo.com/Latcarf

You can disable completely this kind of exercices (which are useless when you’re doing a reverse tree) by disabling listening exercices in Duolingo’s options. And indeed, if the text is not available on the page, there is no way I can play it.

October 14, 2015

https://www.duolingo.com/Bellatrix86

You're right, that makes sense, that they don't show up at all, when speakers are disabled. I had only voice autoplay off. And yes, I kind of expected that you couldn't do anything about them, because otherwise you probably would have done so already.

October 15, 2015

https://www.duolingo.com/Bellatrix86

Hmpf, this disables all sound effects as well. And I love the sound effects! It seems that I have to endure the pure listening exercises if I want to keep the motivating sound effects. Not your fault though, I just want to whine about it. ;-)

October 15, 2015

https://www.duolingo.com/wchargin

Oh, okay. Like Latcarf said, you can disable "Speaker." This is in the second paragraph of the original post, which is why I was confused (I assumed you must have meant something else).

October 15, 2015

https://www.duolingo.com/butstay

The Google TTS api recently changed. I followed this: http://stackoverflow.com/questions/32053442/google-translate-tts-api-blocked

And changed a single line of your code. Works now: playSound("http://translate.google.com/translate_tts?tl=" + targetLang + "&q=" + sentence + "&client=tw-ob");

October 25, 2015

https://www.duolingo.com/Latcarf

It does seem to help, I don’t think I had to solve a single captcha since I added "&client=tw-ob" six days ago, so I pushed this change to Github. Thanks!

October 31, 2015

https://www.duolingo.com/Latcarf

What do you mean by "works now"? Was it not working before? And how long have you been testing this change?

If you’re talking about the need for solving a captcha, I tried to put "&client=t" as suggested in a similar post as the one you link to, and the consequence was that the day after I was presented with an error message "try again later" without any captcha for getting around it (so this time it was really blocked). It might do the same with "&client=tw-ob", although I’ll try it to see.

October 25, 2015

https://www.duolingo.com/butstay

Yes, I got a TTS error message on the second sentence. tw-ob working fine after 20+ sentences

October 25, 2015

https://www.duolingo.com/Latcarf

But have you tried it over several days? When you get the error message, you can just solve the captcha, and then you won’t get the error anymore for some time. I usually get the TTS error only once a day, at the first sentence, and after that I can do hundreds of sentences without any problem.

October 25, 2015

https://www.duolingo.com/butstay

Interesting, I kept getting the TTS error so I looked for this solution. I'll see how it goes tomorrow. Yes, issue remains after solving captcha.

October 25, 2015

https://www.duolingo.com/Latcarf

When getting the TTS error, did you try to solve the captcha (by clicking on "here" in the error message)? If you don’t solve it, then indeed you will keep getting the error until you do.

October 25, 2015

https://www.duolingo.com/Nikos-

Oh my god thank you so much! I can't wait to use this... So many languages to choose from now!!

October 25, 2015

https://www.duolingo.com/butstay

I like the Yandex pronunciation better but unfortunately the Yandex TTS does not automatically correct letter accents. For the record, here's how to get the 'incorrect' Yandex TTS.

playSound("http://tts.voicetech.yandex.net/tts?format=mp3&quality=hi&platform=web&application=translate&lang=pl_PL&text=" + sentence);

October 25, 2015

https://www.duolingo.com/Latcarf

And thanks for the suggestion! Maybe I’ll try to make it randomize between Google Translate and Yandex, in order to have several voices.

October 25, 2015

https://www.duolingo.com/Latcarf

What do you mean by "correct letter accents"? If you forget the accents, then I don’t think even Google Translate will try to fix them, it will just pronounce the word as-is (i.e. incorrectly).

October 25, 2015

https://www.duolingo.com/butstay

I don't type letter accents because I'm lazy. I'll type "Czytaja ksiazki" instead of "Czytają książki". Google does a good job of recognizing the missing letter accents (press play sound on the page) while Yandex does not. Especially recognizable on the word ksiazki.

https://translate.yandex.com/?text=Czytaja%20ksiazki&lang=pl-ru https://translate.google.com/#pl/en/Czytaja%20ksiazki

Therefore, Yandex is not suitable as a TTS engine.

October 25, 2015

https://www.duolingo.com/Latcarf

... and on the same example, "czytaja" is not pronounced correctly. It’s really not reliable, try for instance with "Zjadlem miod" instead of the correct "Zjadłem miód". Both the "ł" and "ó" are not pronounced correctly even though the translation given is correct (so Google Translate understood what the words were supposed to be). I think Yandex is perfectly suitable as a TTS engine, it’s your job to give him a correct input (and it’s a bug that Duolingo accepts such errors without even considering them a typo).

October 25, 2015

https://www.duolingo.com/butstay

Agreed, sometimes it's not reliable but certainly better than me typing all of the accents correctly.

October 25, 2015

https://www.duolingo.com/Skjellyfetti

Thanks so much for taking the time to do this!

However, I'm having trouble installing the script. I download it, click it, and then get this error:

Line: 12 Char: 1 Error: 'console' is undefined

Do you know what I could do to fix this or install this?

Thanks!

October 26, 2015

https://www.duolingo.com/butstay

Have you added Tampermonkey to chrome? See instructions: https://github.com/guillaumebrunerie/reversetreeenhancer

October 26, 2015

https://www.duolingo.com/Latcarf

That’s a strange error. Which web browser are you using? Where do you see this error? Do other userscripts work?

October 26, 2015

https://www.duolingo.com/tanyafava

I have the same error. I am using Chrome. The message pops up after I say I want to allow the program to make changes to my computer (or something like that). I haven't tried other user scripts. (And thanks for doing this!)

December 8, 2015

https://www.duolingo.com/Latcarf

As butstay says, have you installed Tampermonkey? (it’s a Chrome extension available here: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo

December 8, 2015

https://www.duolingo.com/tanyafava

Ugh sorry to make you repeat yourself. Tampermonkey now installed, cheers.

December 8, 2015

https://www.duolingo.com/michikade

I've been using this script for a couple weeks and I have to say, the updates just keep getting better and better. Thank you so much for your excellent work on this fantastic piece of scripting. It is an invaluable tool for anyone using a reverse tree and I would recommend it to anybody.

Thanks for the update IRT the captcha thing. Makes life so much easier when Google's TTS doesn't decide to wear out right when you've got a listening exercise. Hehehehe :P

Also the update with the mouse-over reveal is really handy as a learning aid - yeah, it can be cheating but sometimes I have trouble with the direct tree and have to use the turtle several times and that just happens to be a limitation of Google's TTS it seems - sometimes it's just not QUITE slow enough for me personally.

Thanks so much again for this. :D

October 31, 2015

https://www.duolingo.com/Latcarf

I’ve added the possibility of having the sentence played a bit slower, the keyboard shortcut for it is Shift-Alt-Space (and Shift-Space for normal speed) :-)

November 10, 2015

https://www.duolingo.com/michikade

That is awesome! I'm sure others will appreciate the slower speed as well. Thanks!

November 10, 2015

https://www.duolingo.com/WordFitlySpoken

All right, I've tried this using the English to Dutch tree. It works pretty well. The only thing is, I noticed that when it's an exercise translating from English to Dutch, the TTS reads the English sentence...with the Dutch TTS. This certainly creates some interesting (but perhaps realistic in a way) challenges trying to understand what the heck the voice is even saying...in English!

Is this the way it's "supposed" to be, or is something perhaps acting up here? Is there any way to have it not read the English text I'm supposed to translate to Dutch?

Thanks for a cool script!

November 18, 2015

https://www.duolingo.com/Latcarf

Fixed. Duolingo is using a nonstandard language code for Dutch ("dn" instead of "nl") unlike all other languages that have been tested so far, so my script was not working properly.

November 18, 2015

https://www.duolingo.com/WordFitlySpoken

Thank you! I was definitely caught off guard, ha! My first thought was "Well...I guess I could pretend this is me trying to understand someone's Dutch accent speaking English..." :) But it sounded like a dying duck, so I thought I'd check to be sure.

November 19, 2015

https://www.duolingo.com/Latcarf

It’s a bug, I’ll look at it as soon as I can.

November 18, 2015

https://www.duolingo.com/Thomas.Heiss

Hello, great script. Thank you.

Also your tip here on the discussion forum in de-activating the audio pretty much makes sense - I overlooked it once before.

For the English-German tree reverse course (native German) of course it makes no sense that there is either
- German sentences being spoken by DuoLingo
- DuoLingo speaking German and you have to write down the sentence in German instead of translating it into English

So with switching the audio settings it seems I could succesfully kill those annoying German practice test questions. Hope so. Will have to test more.

BTW: What would be the easiest way to fast switch audio on/off? Keyboard hotkeys?

Having to go to the Profile settings menu is a little of work if you have multiple language courses active and you have to do that each 1-2 days... For the normal tree courses audio has to be ON (of course).

October 31, 2016

https://www.duolingo.com/cazort

I was using this and it was working beautifully but stopped working entirely after the recent redesign.

Is there any effort underway to rewrite this to work with the new website? I would really love this, because I could continue working through the courses I had been working through.

I might be willing to chip in some donations to make this happen.

October 6, 2017

https://www.duolingo.com/Latcarf

Hello, no I am not planning to rewrite it to work with the new website.

But have you tried the userscript "DuoLingo Tree Enhancer" from Camilo?: https://www.duolingo.com/comment/19654789. It’s an improvement of my original script with more features, and I believe it works with the new website.

I haven’t tried it yet personally but it seems quite active so I believe it should work.

October 6, 2017

https://www.duolingo.com/Thomas.Heiss

Is anybody using Camilo's "Duolingo Next Lesson" Tampermonkey user script?

Finally I have added a new (longer) comment highlighting some facts about

  • to filter skills by strength (there was a user style to filter golden skills)
  • rename skill names (adding prefixes, e.g on our www.duome.eu/USERNAME/progress page)
  • a (crowns) level-up lesson strategy concept to focus on more difficult grammar (e.g Subjunctives) / Verb tense skills

in Camilo's "Duolingo Next Lesson" thread: https://forum.duolingo.com/comment/26849592$comment_id=29666271

as well as "[HOWTO]: Different ways for spaced repetition with skill strength viewer (user script and extension)" thread: https://forum.duolingo.com/comment/29304553$comment_id=29666130

I would like to invite advanced users and user script or user style programming gods to join and discuss questions and ideas on a brainstorming level.

Best regards / Viele Grüße

November 16, 2018

https://www.duolingo.com/cherub721

Question:

"For instance when you have to translate from Polish to English, instead of showing the Polish text on the left, you will be shown a big gray box and be asked you to translate what you’ve heard instead. You will see the Polish text afterwards, whether you have it right or wrong. "

For these types of questions, is there a way to make the audio repeat before we try to translate it? I'm assuming that refreshing will just take me out of the lesson. Sometimes I am caught a little off guard and by the time I realize it's a translation question, I missed it.

October 11, 2015

https://www.duolingo.com/Latcarf

Yes, Shift-space.

October 11, 2015

https://www.duolingo.com/cherub721

Works perfectly! Thanks.

October 11, 2015

https://www.duolingo.com/WoutJan

I'd love to try this, but whenever I try to download it I get a small popup saying "Apps, extensions, and user scripts cannot be added from this website." and when I try to open it I get this https://imgur.com/K5Gtpvf. I barely know anything about this kind of stuff, so does anyone know how to fix it?

October 26, 2015

https://www.duolingo.com/butstay

Download the script. Install Tampermonkey for Chrome. Copy and paste code into Tampermonkey. Refresh duolingo. Search within this thread if you come upon further errors.

October 26, 2015

https://www.duolingo.com/WoutJan

It worked, thank you!

October 26, 2015

https://www.duolingo.com/BulentErdemir

Hi, thanks for the script. :) I'm learning German and the translated text (via Google) is spoken by the computer, however, the German text on the left is not grayed out. On the other hand, when I'm to choose from three pictures (like select translation of man page where I have der Mann, die Frau, der Junge options, all pictures are grayed out. I thought this might be a bug.. Thanks for your help..

October 31, 2015

https://www.duolingo.com/Latcarf

Are you sure you are using the reverse tree? (ie the course teaching English for speakers of German instead of the one teaching German for speakers of English) This script is designed for people using the reverse tree, not the normal one.

October 31, 2015

https://www.duolingo.com/BulentErdemir

I don't know what a reverse tree is. :) Michikade recommended her favorite scripts in another thread and I thought I'd install them. I should have read more before posting here. Sorry. Will get back to you if I still have questions.

October 31, 2015

https://www.duolingo.com/Latcarf

No problem. A "reverse tree" is when you are using the course teaching the language you already know (in your case English) for speakers of the language you want to learn (in your case German), and this script will only work as expected if you are in this case. You can do it like that (and use my script), but be aware that there are several differences with respect to a normal course: Duolingo will all be in German, the course won’t be designed to learners of German, you won’t have the buttons for typing the special characters of German, you will be asked to translate to German more often, and so on.

November 1, 2015

https://www.duolingo.com/BulentErdemir

Got it. Thanks. :)

November 1, 2015

https://www.duolingo.com/HappyEvilSlosh

I love the idea of the script but it really didn't work well with me. I had two major issues with it, both in the Japanese→English course.

  • On the picture questions the script read out Undefined as the word. Is this maybe because 「」 are used as delimiters rather than ""?
  • On everything else the text was covered in grey boxes that would usually (but not always) come right when I put my mouse over them, but then go back to grey boxes if I moved it away again.

I hope you can fix this because it's really very cool. I was using it in Iceweasel 38.4.0 (Debian's rebranded firefox) in Debian 3.16.7-ckt11-1+deb8u5 (stable) on kernel 3.16.0-4-amd64.

November 10, 2015

https://www.duolingo.com/Latcarf

Thank you for trying it with Japanese! I haven't tried it at all with such "complicated" languages, so I'm expecting potential issues. I temporarily fixed the first issue (it will turn the Japanese quotation marks into usual quotation marks, but at least it should hide and pronounce the right thing now). For the second issue, I'm not sure I understand the problem. Note that when you have to translate from Japanese to English, the Japanese text will be hidden in a grey box, but it can be shown anyway by clicking on it.

November 10, 2015

https://www.duolingo.com/HappyEvilSlosh

Cool, thanks for the prompt fix. I saw it had been updated and wondered if it was because of my post. ^_^

Note that when you have to translate from Japanese to English, the Japanese text will be hidden in a grey box, but it can be shown anyway by clicking on it.

Oh... hmmm. Is there a way to disable that? Because I find it super annoying. Plus for the exercises where you have the Japanese text and have to select one of three on the right hand side all the text boxes are covered in grey making the task a bit more... interesting. :P

Even if you just point at where I can change it in the source code I'm happy to do that myself if you don't want to make it a change for everyone. I'm just not particularly familiar with JS and am not entirely sure where to make it.

Edit: Well something I removed stopped hiding stuff and the rest seems to be still working. :P Your change with the brackets seems to be going fine too thanks! It's a really good idea and I'm surprised it's actually possible. You should be very please with yourself! Have a heap of lingots.

November 10, 2015

https://www.duolingo.com/Latcarf

I fixed the quotation marks properly, now it should keep the Japanese ones.

November 10, 2015

https://www.duolingo.com/Latcarf

Why do you want to disable it? Do you need to be able to click on the box without nothing happening? The reason this feature has been introduced is that in some languages there can be two different sentences which are pronounced exactly the same (for instance "Il parle" in French means "He’s talking" and "Ils parlent" means "They’re talking", and they are both pronounced exactly the same). In such cases, you need to be able to look at the text in order to know which traduction Duolingo is expecting. If you want to, you should be able to disable it by removing the "cell.onclick = …" lines in the challengeTranslateTarget function.

For multiple choice questions, it’s also on purpose that everything is hidden, so that you can concentrate on the audio without being influenced by the three choices. You can see them just by putting the mouse over them.

November 10, 2015

https://www.duolingo.com/HappyEvilSlosh

It's just preference I guess. Although in the specific case of Japanese part of it is that I'm also needing to learn to recognise the characters and on top of that there's also a number of homophones that are distinguishable in writing/context but not by sound. Thanks again for designing it though. :)

November 10, 2015

https://www.duolingo.com/Latcarf

Ah, I guess I misunderstood you then, what you want to disable is the fact that the Japanese text is hidden so that you just have the TTS and no hiding at all?

November 10, 2015

https://www.duolingo.com/HappyEvilSlosh

Yep that's exactly right! Sorry for any confusion, I know I can be less than crystal clear at times. :P

Edit: Sorry, the images weren't showing up for me previously. I now see that they hiding was intentional behaviour, I didn't realise. My bad!

November 10, 2015

https://www.duolingo.com/Araganagan

Looks like a brilliant idea! I will try it for Norwegian

November 20, 2015

https://www.duolingo.com/Latcarf

I'm afraid there is no reverse tree for Norwegian...

November 20, 2015

https://www.duolingo.com/Araganagan

Oh well, if there is I will try it. For now at least it's useful for other languages I look to learn!

November 20, 2015

https://www.duolingo.com/Schriesel

This is fantastic! I tried it with the English from Greek reverse tree, and the TTS works fine for the most part (producing a lot of errors with stress and rhythm), but it is just so much more interesting when audio of the actual target language is involved. I am much more motivated to finish the reverse tree now, thank you so much!

December 2, 2015

https://www.duolingo.com/Tge2

Is this still an open project? The button appears in my duolingo window, but clicking on it does nothing.

April 22, 2017

https://www.duolingo.com/Thomas.Heiss

Have you already tried the new user script "DuoLingo Tree Enhancer" from Camilo?: https://www.duolingo.com/comment/19654789

I am currently using it for the English-Portuguese forward course to play the audio of PT answers (audio play was updated for multiple types of questions including multiple-choice).

April 22, 2017

https://www.duolingo.com/Thomas.Heiss

Works now with the new DuoLingo 2017 portal code: https://www.duolingo.com/comment/10954397$comment_id=23151162

June 19, 2017

https://www.duolingo.com/Thomas.Heiss

NEW: Camilo's script even includes now (tested for forward trees so far by myself) the possibility to read out loud multiple-choice L2 audio (e.g Portuguese from EN-PT course) answers, not only translation challenges! This has not been working before.

I guess I remember that playing audio of multiple-choice L2 (target language) challenges was included in your reverse tree enhancer script?

Question to Latcarf: Had you get it working before to even play the audio of "choose single word from drop-down box" challenges?

June 20, 2017
Learn a language in just 5 minutes a day. For free.