JASchilz / AnkiSyncDuolingo

Pull your Duolingo vocabulary into Anki, as an Anki plugin
MIT License
101 stars 10 forks source link

Audio for Cards #72

Closed JacobWeinbren closed 4 months ago

JacobWeinbren commented 1 year ago

Can the audio from the Duolingo pronunciation be added to the card? This is within the Duolingo API. Secondly, the translations for the Hebrew do not work - returning 'Provide the translation for 'xxx from Hebrew.' for each term.

Thank you for making this; these changes would significantly improve the plugin.

JASchilz commented 1 year ago

Hi @JacobWeinbren ! These features would definitely improve the plugin and be very helpful for users.

Sadly, I can't provide translations. Duolingo doesn't offer first-class API support, and most third-party plugins are using an old version of the API which Duolingo is progressively restricting or turning off parts of. Specifically, this plugin uses this Duolingo Python library, which uses a version of the API which lost translations in November. The plugin description on Ankiweb describes how the plugin no longer provides translations and the user must provide the translations as part of their initial card review, but you can see #61 for some strategies that other users have used to bulk translate items.

Audio might be feasible. The get_audio_url method in the library suggests that this might be possible. I'll leave this issue open to reflect that I'm open to a pull request on this issue.

My perspective on new features is that this plugin is currently on maintenance-only mode, due to Duolingo progressively switching off features in the version of the API used by the plugin and throwing up other roadblocks to its use, like disabling API login--only some heroics from other users of this plugin allowed it to continue working by faking a web session. I expect that at some point the API endpoints used by this plugin will become completely unavailable. After having to react fast to a couple of deprecations by Duolingo, new features seem to me like another new liabilities.

Thanks again for posting this. Hopefully this adds some context to why I am not currently doing any development for this plugin. But once again, I'll leave this open in case anyone is interested in testing whether the audio endpoints work and implementing the changes necessary to use them.