sviatoslav-lebediev / anki-quizlet-importer-extended

83 stars 10 forks source link

Audio is in the wrong language #34

Closed apolotion closed 2 years ago

apolotion commented 2 years ago

Hi! I've been using this addon for a bit of time to study languages, and it's been incredibly helpful. Recently I reset my machine, and I reinstalled the addon alongside Anki. I think that there's an issue at the moment though, in that the front of my cards are read in English, while the backs are also read in English. I've done this with French, Chinese, and Polish, yet all the backs are still being read in English. At the moment, I'm trying to get my French deck going. Here's a link to the deck itself, alongside the Quizlet that I'm trying to import from, which has the audios from English to French. Thank you for your hard work and dedication to this addon!

Deck: https://ankiweb.net/shared/info/1702896966 Quizlet: https://quizlet.com/664167681/french-vocab-v4-1-10-flash-cards/

sviatoslav-lebediev commented 2 years ago

Hi, I will take a look

sviatoslav-lebediev commented 2 years ago

It's interesting. For some reason, Quizlet returns different data when you open a page in a browser and when you download the page using an addon. that's what it returns as an addon version

                "cardSides": [
                    {
                        "sideId": 0,
                        "label": "word",
                        "media": [
                            {
                                "type": 1,
                                "plainText": "Smart",
                                "languageCode": "en",
                                "ttsUrl": "\/tts\/en.mp3?v=14&b=U21hcnQ&s=d.GOVxgh",
                                "ttsSlowUrl": "\/tts\/en.mp3?v=14&b=U21hcnQ&s=d.GOVxgh&speed=70",
                                "richText": null
                            }
                        ],
                        "distractors": []
                    },
                    {
                        "sideId": 1,
                        "label": "definition",
                        "media": [
                            {
                                "type": 1,
                                "plainText": "Intelligent",
                                "languageCode": "en",
                                "ttsUrl": "\/tts\/en.mp3?v=14&b=SW50ZWxsaWdlbnQ&s=D7ZvOaMW",
                                "ttsSlowUrl": "\/tts\/en.mp3?v=14&b=SW50ZWxsaWdlbnQ&s=D7ZvOaMW&speed=70",
                                "richText": null
                            }
                        ],
                        "distractors": []
                    }
                ]

as you can see it is an English version for the definition, but in the browser version, it returns a french version. I will need more time to understand why. I will let you know when I find something For some definitions it returns a correct audio link

 {
                        "sideId": 5169700707398014,
                        "label": "definition",
                        "media": [
                            {
                                "type": 1,
                                "plainText": "Prochain",
                                "languageCode": "fr",
                                "ttsUrl": "\/tts\/fr.mp3?v=9&b=UHJvY2hhaW4&s=5F7WnDM8",
                                "ttsSlowUrl": "\/tts\/fr.mp3?v=9&b=UHJvY2hhaW4&s=5F7WnDM8&speed=60",
                                "richText": null
                            }
                        ],
                        "distractors": []
                    },

                    ...
                     {
                        "sideId": 5169700707397942,
                        "label": "definition",
                        "media": [
                            {
                                "type": 1,
                                "plainText": "Ans",
                                "languageCode": "fr",
                                "ttsUrl": "\/tts\/fr.mp3?v=9&b=QW5z&s=kXl5Hjkk",
                                "ttsSlowUrl": "\/tts\/fr.mp3?v=9&b=QW5z&s=kXl5Hjkk&speed=60",
                                "richText": null
                            }
                        ],
                        "distractors": []
                    }

take a look at ^ words, maybe you will find how to fix a deck

apolotion commented 2 years ago

Hey again! Not entirely sure what happened, but the sets seem to be downloading just fine now with the language in the proper language. I guess waiting just works sometimes lol.

sviatoslav-lebediev commented 2 years ago

Hi, interesting, maybe Quizlet had some issues. Anyway, thank you for letting me know.