Please provide as much detail as possible when reporting an issue as that will help me to be able to resolve it.
Hi, could you add the link to the shared add-on here ?
Addon page is at Audio Files - AnkiWeb
Hello!
First of all, thank you for your add-on!
I take the time today to write you down as Iām currently learning French, English and German, I would love to have some kind of drop-down to choose from to select the right ālocaleā before the query is made. Iāll be willing to contribute. Is your add-on on GitHub?
And one last thing, I donāt know if itās a bug but when I search for with some text selected, the text is replaced by the ā[sound:example.mp3]ā. Is it the expected behavior?
Thank you
Thank you, Iād be glad for you to contribute ā the repo is at https://github.com/r-appleton/addons
The behaviour that you indicate looks like a bug ā ā[sound:example.mp3]ā should be appended to the end of the text, not overwrite selected text. Could you look at fixing that when making your changes?
And thank you for your appreciation of the addin!
regards,
Richard Appleton
The behavior that I described maybe OS-related. Iām using MacOS for info.
For the rest, right now I have your repo cloned and I tweaked a bit here and there. Much left to do!
i was wondering if there was a way to display the files if there are more than one?
in forvo for example some times there are more than one files with varying qualities, it would be amazing if we could select the best one.
the add on is really helpfull, i was just wondering about this one thing.
have a nice day
Thank you for your suggestion. I would not want to spoil the simplicity of using this addin, but will look into how your idea can be doneā¦
Unfortunately I wonāt be able to do that for a couple of months.
To begin, thanks for this addon, it saves me a lot of time.
I have a (simple) feature request : could the addon clean the word for the accent marks before looking for the audio files?
Usually, I paste the Russian word from wiktionary and the accent mark which is useful for learning prevent the addon to find the audio file.
I am not completely ignorant of python so if you explain me where to look to, I may me able to do it.
TIA
It should be simple to implement this request if youād like to try to do it yourself.
Iād added some rules that change the text used for the lookup - these are in rules.py, so to do this you just need to add a new entry to the RULES map. The string key is the text that appears in the configuration dialog.
Thanks,
Will try to have a look next week-end
Best Regards.
OK, it seems to work.
RULES = {
āunchangedā:{ādescriptionā:āleave unchangedā, āfunctionā:lambda w: w},
ālower caseā:{ādescriptionā:āconvert to lower caseā, āfunctionā:lambda w: w.lower()},
ācapitalizeā:{ādescriptionā:ācapitalize first wordā, āfunctionā:lambda w: w.capitalize()},
āreplace \u0451 with \u0435ā:{ādescriptionā:ā(Russian) replace \u0451 with \u0435ā, āfunctionā:lambda w: w.replace(ā\u0451ā, ā\u0435ā)},
āsuppress \u0301ā:{ādescriptionā:ā(Russian) suppress \u0301ā, āfunctionā:lambda w:w.replace(ā\u0301ā, āā)}
}
Could you add this modification in your code ?
Best regards,
Ping.
I have a couple of colleagues that may be interested by Anki with your addon but it would be difficult for me to explain them that they have to edit by hand rules.py to have it working properly.
It was very nice from you to explain me how to get the feature I wanted, I just hope that anybody could use it just the same;
Best regards,
Alain
Hi. Thanks for reading this!
Iām wondering if your add-on could be used to link sound files in cards to their associated audio file in the collection.media folder and perform some action on them. Iām learning Mandarin and have a huge deck, over 8,000 sentences (called Spoonfed) and would like to find and extract the audio files of the cards Iāve studied so far, some 3,000 or so.
Unfortunately, the media files would have to be found manually, one by one, by doing individual searches for the ācode nameā in the sound file field on each card (e.g. sound:tmp4ghvjq.mp3 or sound:334818.mp3). If I try to do this manually, I will most likely be in a retirement home before I finish or even pushing up daisies.
So Iām hoping there might be a way to have your add-on do the following:
- find ALL the sound file fields of the SELECTED cards (in my case, the first 3,000 cards)
- locate the associated audio files in the collection.media folder
- copy those to a designated folder (e.g. on my desktop) without deleting the originals in the folder
- add a numerical value at the start of each ānewā copied audio file so that they remain in the same order (this desk is progressive and needs to be studied in the order provided by its author)
Okay, that sounds a lot, right? Sorry about that. Like others here, Iād be happy to make a contribution. My aim is to build larger audio file tracks from these individual files, with lots of repeition, to listen to as I go about my day or walk on the nearby hills. In my efforts to find a solution to this Iāve come across numerous others online who seem to have the same problem i.e. finding the associated audio files in the collection.media folder.
Finally, may I make a suggestion as to the name of your add-on? It seems such a valuable tool and I know that Iāve passed over it several times before without checking it out. I wonder if calling it something like āFind Audio Filesā (or something similar) might not more effectively get the attention of those scanning down the list of add-ons?
Whether or not you can help me, many thanks for at least reading this longish post.
All the best!
Randal.
Apologies for the delay in updating the addon with your rule change - unfortunately personal circumstances got in the way.
Iāve now added that, so your colleagues should be able to use it without needing to edit the code themselves.
I think that your requirement does not really fit what this addon is about - I wrote this to lookup sound files from external data sources in order to save myself time.
Iād suggest that you try writing your own addon for your specific purpose - look at the code for this and other addons to help you if you need. You can find the sound file names in a card using a regexp (it will contain ā[sound:ā¦]ā), and the collection.media folder location is available from Anki - so I donāt think that it should be too complicated to write what you need.
No need for apologies. It is me that is grateful for your work and your answers to my feature request.
All the best
A.
Many thanks for getting back to me. I wasnāt sure if it would align with your add-on. No worries! And all the best! Cheers.
Hello,
There are some pages where Wiktionary has a sound file and Audiofiles canāt get it. For example : ŠæŠµŃŠµŠ²ŠµŃŠ½ŃŃŃŃŃ - Wiktionary
How could I debug this problem?
Best regards,
It have always had this issue, or maybe the target website has changed a little.
To fox it you need to inspect the web page to see what URL the site uses to play the sound, then check that the same URL is generated by the Python code in the addon.
Unfortunately Iām personally very tied up at the moment, so wonāt be able to look at it myself for some months. If you are able to fix it that would much appreciated.