Bỏ qua đến nội dung

Audio Files

Chờ xử lý #anki #addon #audio #files
https://forums.ankiweb.net/t/audio-files-addon-support/6080
30/7/2022

Cách tải addon Audio Files

Bạn có thể tải addon bằng một trong hai cách sau:

Click nút Copy bên dưới để copy code vào clipboard

1984823157

Sau đó mở Anki → Tools → Add-ons → Get Add-ons → Dán code → OK

Mở trang addon trên AnkiWeb và tìm mã code ở cuối trang

Mở trên AnkiWeb

Cuộn xuống cuối trang AnkiWeb, tìm dòng có mã code 1984823157 và copy

30
5

Mô tả chi tiết

A simple add-on to search for audio files matching the text in a field. It adds a button to the editor to use during note editing to search for audio data using the text in the current field. A configuration option is provided to make the search use selected text if a text selection has been made.

The audio file content is uploaded to Anki and a [sound:…] element appended to the text. That can be cut& pasted into a separate field for sound if desired, making what I have found to be a quick and simple process for getting sound data into your notes.

For instance, for a field containing “немножко” the result of using this add-on with the cursor in the field would be that the field contains “немножко[sound:немножко.mp3]” and the audio data is copied to Anki’s media folder. It is also copied to a local working folder - by default the system location for temporary data, but the folder used can be changed via a configuration parameter.

3 sources of data are currently used, Forvo, Wiktionary and Open Russian - data sources can be separately enabled or disabled. The addon has been designed to make it easy to add code for using additional data sources.

For Wiktionary the target language to search is a configuration option - it should match the code used by Wiktionary to specify locale, eg “En-uk” for UK English. The default is ‘ru’.

For Forvo the target language to search is a configuration option - it should match the code used by Forvo to search by language. The default is ‘ru’. Accents are supported for Forvo - for instance using a code of “es_es” will search for Spanish words as spoken in Spain.

Instead of using the word as the filename the data can be saved with a random filename by setting the ‘filenames’ configuration option to ‘random’.

To maximise the likelihood of finding a sound file searches will be automatically repeated using minor transformations of the text. This is configured, separately for each data source, by selecting one or more search rules. Note that at least one rule must be selected for a search to be made - by default the ‘convert to lowercase’ rule is selected.

A simple dialog has been provided to make configuration easy. Note that configuration is per Anki profile, so if you use multiple profiles configuration changes will only affect the active profile.

change log 20220730

Forvo parser fixed after broken due to Forvo website change

20220418

added support for language dialects in Forvo

added rule to strip Wiktionary stress accents for Russian

20211111

fixed bug in configuring selected rules

20211110

added configuration per user profile instead of a single global configuration

added text search rules to automate retrying with simple text changes

fixed bug when using selected text - the filename is now appended after the selection instead of overwriting it

20201228

added configuration dialog

added option to search by selected text

20191230

fixed issue if no tmp dir configured

support generating random filenames

20191123

added Forvo data source


Liên kết hỗ trợ


Reviews (30)

👍 2023-12-07

I had the following error message after clicked on the add-on button:

Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools>Add-ons menu item to disable some add-ons and restart Anki, repeat until you discover the add-on that is causing the problem. When you’ve discovered the add-on that is causing the problem, please report the issue o

👍 2023-09-15

I can’t downvote this, but I cannot use the addon, very simple instructions would be nice:

  1. I got the addon and see a button in my cards, I want to add sound to this French (https://ankiweb.net/shared/info/865934440) and another Russian deck but it says [no sound datea found]
  2. I thought this addon would search the audio on its own, what steps need to be taken that if I open my deck that I can click the word (like clé) and it will add the audio of a native French speaker? I looked into the se

👍 2022-12-08

It is still good to have this kind of software but come on, more explication ! seriously… Comment from author This is the first time that anyone has requested more information, so it would be helpful if you’d indicate what you feel is missing or not well explained.

👍 2022-04-19

Fantastic addon, keep it up!

Tried Forvo for the first time )) And have to say I’m somewhat disappointed. Expected more from them. + there are mixing sometimes and instead of Mandarin, the Cantonese pronunciation are downloaded, even though I set locale to ‘zh’.

Wiktionary on the other hand just can’t find anything with the ‘zh’ set.

Feature request: Please add batch operation mode and ability to put sound field into a separate predefined field

(right now only single-card edit,

can’t enha

👍 2022-03-16

Very useful, save quite a lot of time.

👍 2021-12-31

Extremely helpful and saves loads of time manually searching for audio!

👍 2021-12-26

Extremely useful!

👍 2021-12-18

This has saved me so much time, thank you so much

👍 2021-05-28

the add on is fantastic

👍 2021-02-07

Works great for chinese flashcards!

👍 2021-01-21

Very good! Thank you!

👍 2020-12-13

This is saving me SO much time! Thank you.

👍 2020-11-02

works!

👍 2020-10-22

Really nice and easy to use and the code is super easy to edit. It would be amazing if it is possible to search for only marked words since often my decks contain more than the single vocabulary in one field. The add-on will always seach for the whole field wich is unfortunate. For instance: My backside “la Sociologia (f)” can t be found, but fovea has the word sociologia. Comment from author The differences between languages! Thank you for this suggestion - I have added a new feature so that y

👍 2020-10-10

Amazing addon! It would be impressive to look for sentences instead single words (for example with google translator) to add a voice to the “dry” cards!

Thank you!

👍 2020-10-01

This is awesome! I am a newbie, so I was copying/pasting all the wiktionary audio files. Thanks man, you saved so many hours of my life!

👍 2020-07-25

Could someone help me get this to work for Hungarian? Comment from author Just set the Forvo language code to ‘hu’

👍 2020-07-13

Is there any way to add the audios to a whole deck without having to do it for each card one by one?

👍 2020-06-23

Спасибо большое!)

👍 2020-05-21

works for Hungarian! Many thanks.

👍 2020-05-18

Works well for Forvo! I have a problem with Wiktionary for Chinese though

Edit: it does work but apparently only with pinyin, not characters, because that’s the file names that are used. Doesn’t work with all words because some times the filenames on Wiktionary are messed up. Also, if your pinyin is formatted in some way (mine often is due to the Chinese Support extension), it won’t work. So, make sure you don’t use any formatting

Edit 2: it would be really cool if we could import audio fr

👍 2020-05-10

Really helpful, I was able to download more than 5000 forvo audio files thanks to this add-on ! Thanks a bunch!

👍 2020-04-26

It’s very helpful.

Good job.

👍 2020-04-15

Working fine but currently shtooka.net is down. I don’t know how much longer that will last but until then can it be updated to source from a different website?

👍 2020-04-12

It is working :-)

Fetching from Forvo English OK.

👍 2020-03-17

I set Forvo to Korean and it works perfectly! I’ve got no problems with any settings and it helps a lot. Thank you!

👍 2020-01-19

Great add-on - this was very easy to configure for my target language (German) and worked seamlessly with my decks. Thanks!

👍 2020-01-15

Hello.

Many thanks for the plugin but I can’t make it work, it gives me a “couldn’t find sound data”

http://prntscr.com/qo55y4

Here a screenshot. I wanted to only use Forvo and even set the language to “de” (it didn’t work either when it was by default “ru”).

What do you think it could be?

Srry to give the red hand :(

👍 2019-12-14

Unfortunately, the addon fails to load with both custom and default config. Comment from author A very unhelpful and selfish comment.

I’d developed this for my own use, and in the spirit of Anki shared it as I thought that it may benefit others. However, a comment of just “doesn’t load” makes me think that maybe I’m better to keep my addins to myself.

Could you not even be bothered to post any information that would help diagnose what was wrong, and so help fix it?

👍 2019-12-07

Thank you. Unfortunately the addon does not load. I’m on macOS Mojave, Anki 2.1.15. Here some details:


An add-on you installed failed to load. If problems persist, please go to the Tools>Add-ons menu, and disable or delete the add-on.



When loading 'Audio Files':

Traceback (most recent call last):

  File "aqt/addons.py", line 80, in loadAddons

  File "/Users/aus/Library/Application Support/Anki2/addons21/1984823157/__init__.py", line 12, in <module>

    datasource.setConfig(mw.addo