Is it allowed to add audio files directly to the Card Templates editor in AnkiDroid?

I want the same audio file to be played in all notes when I flip the card.

I was doing this manually, but while exploring Anki’s settings, I went to Card Types and put my audio there: [sound:meuaudio.mp3].

To my surprise, it appeared and was played automatically in all my notes! It was amazing! I thought I had discovered something unique.

Then I started searching more about this to see if I could find any information, but I didn’t quite understand. I mean, correct me if I’m wrong, but it seems that this screen was designed only to display things on the study screen.

That is, if you put a sentence there, that sentence will appear in all notes. If you put an image there, that image will also appear in all notes.

As for the audio issue…, could it have been something entirely unintended? Something I discovered by chance? Is it like a bug? I mean, since this screen was designed to display things, following this logic, if someone puts the name of an audio file there ([sound:meuaudio.mp3]), it should only display the name of the audio file in all notes, not play the sound. Could this be something the developers didn’t notice and that might no longer work in the future?

Is that how it works? Is that really how it is? Was this screen designed only to display things in all notes automatically, or was it also designed to display and play audio and video?

Observation:

I also noticed that if you put the name of a field in the template several times, the content inside it will also be repeated several times.

For example: I created a field called {{AUDIO}} and put that name in the template 20 times. Then I created a note and put an audio file in that field. The result was that the audio was played 20 times!

Which is really good for learning languages, you know? Repeating a sentence several times with audio automatically helps it stick in your head more.

But is this also something temporary or unexpected, or is it actually part of how Anki is designed to work?

None of that is accidental. You can put in your card template whatever you want displayed on your cards, when Anki creates them from your notes. [Make sure you understand the difference between notes and cards.]

What you’ve stumbled upon is the foundation of how to design cards that work for you, so see the manual to learn more about field replacements and displaying the same media on every card.

For the most part, what you put directly on your template will be parsed the same way as what you put in the field of a note, and then add on your template by a {{field replacement}}

I accessed the link to the Anki manual that you gave me.

I noticed that the section is titled “Static Sounds/Images”, but the example in the explanation only shows an image reference ().

Does this mean that references to static audio files are also supported directly in card templates? And, if so, does adding [sound:_audio.mp3] to the template make the same audio file play automatically on every card that uses that template, rather than simply displaying the audio filename?

I also noticed that we need to add an underscore at the beginning of the image filename (e.g., “_logo.jpg”).

I just want to make sure I understand this correctly.

Yes, all of that is correct. [sound:_audio.mp3] is a special sort of “tag” in Anki, but it will be parsed exactly the same in a card template as it is when you put it in the field of a note that is displayed on a card.

Thank you for clarifying! That answers my question. I understand now how static audio references work in card templates.This will be very helpful.