0 0
Contact Author Sign in to rate

Lingua Libre and Forvo Audio Downloader

0.13MB. Updated 2022-07-15.

Description

This add-on performs batch and single-card downloads of audio from forvo.com. It has a number of advanced configuration options to aid in this process. When using this addon, I ask you to keep in mind that Forvo is a community project and please be a good member of that community. Please only requests pronunciations that you think other will find useful. Don’t make too many requests a day. Also, every language has thousands of requests still pending, if possible, use the time that this addons saves you and pronounce a few requests. Disclaimer: There is a possibility that you might temporarily banned from Forvo. I’ve done everything to mitigate this and have run this addon on more than 50,000 notes in one day, but your experience might vary. To use the program, you first need to add a configuration by going to Tools → Addons → Lingua Libre and Forvo Audio Downloader. After configuring the setting, you can run a batch download by going to Tools → “Download Audio” or pressing the speaker icon on either the Add or Browse screens. When running a batch operation, Lingua Libre and Forvo Audio Downloader will prompt you to select a configuration. Required Options The simplest configuration would have the following properties "The name of the configuration": { "fields": { "text_field": "audio_field" }, "language": [ "the language_code used on forvo, e.g. fr, de, ja", "the language code used on Lingua Libre, e.g. fra, deu, jap"], "note type": "The note type" } "fields" is used to specify a pair of matching fields. The text_field contains the terms that you wish to find audio for while the audio_field will be used to store the sound if it is found. You can have multiple pairs, e.g. "text_field_1": "audio_field_1", "text_field_2": "audio_field_2" "language" will tell the addon which language your words are in. It uses the same language codes as on Forvo and Lingua Libre. For example, instead of French, use ["fr", "fra"] . Forvo uses ISO 639-1 codes and Lingua Libre uses ISO 639-2/T codes. For a complete list, see this Wikipedia article. "note type" is what specific note type your cards are. The note type must contain the fields listed in the field parameter. For example, a simple configuration would look like this: "French": { "fields": { "Front": "Back" }, "language": ["fr", "fra"], "note type": "Basic" } In addition to these required parameters, you can specify a number of others to improve your experience. Forvo Specific Options “accent” allows you to specify an accent for English pronunciations on Forvo Lingua Libre specific options "prefer_locations" allows you to specify a list of places that you would prefer "restrict_to_places" limits the results to speakers from these places Optional Parameters for Filtering Results "add_tag" will add a specific tag to every note that the program adds audio to "recheck_tag" will recheck any card with this specific tag during batch operations "exclude_speakers" will remove certain speakers from your search results "prefer_speakers" creates an order of preferences for your favorite speakers. "deck" allows you to limit the search only to notes in a certain deck Textual Manipulation: "find_and_replace" will perform find-and-replace operations on your notes "prefixes" will the remove the specified prefix from the search term "suffixes" will the remove the specified suffix from the search term "remove" will remove the specified text from the search term "separator" will split the search term into multiple searches based on the specified separator "tag_missing" will add this specific tag when using the separator tag and not all searches return a result. Here is the most extensive configuration: "Configuration Name": { "add_tag": "add this tag to every card to which a sound file is added", "exclude_speakers": [ "person_1", "person_2", ], "deck": "the name of the deck (optional)", "disable_Lingua_Libre": "If set to True, this will disable retrieving results from Lingua Libre", "disable_Forvo": "If set to True, this will disable retrieving results from Forvo" "fields": { "text_field": "audio_field" }, "find_and_replace": { "find": "replace with" }, "language": ["the language_code used on forvo, e.g. fr, de, ja", "the language code used on Lingua Libre, e.g. fra, deu, jap"], "note": "The note type", "max_date": "Redownload the Lingua Libre database if the existing file is older than this number. The default is 1" "prefer_locations": [ "Prefer speakers from this place", "and this" ], "prefer_speakers": [ "person_1", "person_2", ], "prefixes": [ "remove this from the start of the text_field", "and_this" ], "recheck_tag": "any card with this tag will be rechecked", "remove": [ "remove this from the text field", "and this" ], "restrict_to_places": [ "Only get files of speakers from this place", "and this" ], "separator": "used to divide the text field into multiple searches", "suffixes": [ "remove this from the start of the text_field", "and_this" ], "tag_missing": "When using the separator option, this will tag notes that don't have a pronunciation for each part" }, Current Version: 2.5 Change log: 1.0 released on 14 May 2022 - Initial Release 2.0 released on 29 May 2022 - Add Support for Lingua Libre 2.1 released on 2 June 2022 - Fix rechecking of Lingua Libre database 2.1.1 released on 3 June 2022 - Handle Corrupt Lingua Libre database files. 2.1.2 released on 3 June 2022 - Fix Invalid Search when limiting by deck. 2.3 released on 11 June 2022 - Optimize Lingua Libre database and bugfixes. 2.5 released on 15 July 2022 - Fix Forvo after changes on website

Download

As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:

124265771

If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

All Anki 2.1.x Add-Ons Contact Author