TTS only for a specific field

Hi guys I’d like to ask for help. I am using Anki for learning a language and have a very specific idea about how my cards should look and work. I’ve been strugglinf with this issue for some time, since I am not familiar with codes, I am not able to customize them according to my needs, though.
What is an ideal card supposed to look like?
Front side - 1st field of the card (no problem)
Back side - 2nd field + 3rd field + 4th field
2nd field - I want this text to be read by TTS both on the desktop version and on Ankidroid. (no problem)
3rd + 4th field - I want those not to be read at all. I also want each of them to be on a new line. I want them to be editable in the preview window of cards. (as regards colours etc.)
I was able to prevent TTS from playing them. However, there were difficulties with editing the text, I was only able to prevent TTS from playing those fields, nothing else. Thank you in advance for your kind help. :slight_smile:

You can put <br> tags between each field in your card template to add new lines. E.g.:


Vanilla Anki doesn’t support this, but you can try this add-on: Edit Field During Review (Cloze) - AnkiWeb

Hi, thank you for your answer. I know about this.But it doesn’t work with the code I’ve made. I’ve made - that is not exactly true - I just tried to copy and paste parts of codes to achieve my goal. As regards the editing of my fields, I’ve probably expressed myself incorrectly. I don’t need to edit them during learning. I just want to be able to change colours etc. in those fields through the editor in the card browser. But I cannot do that, because it doesn’t work with my card template. The edited field does not show while learning. I could share my template, it is pathetic, though, since I have no coding knowledge. I need someone who is into coding to make my templates from the ground up, I guess.

You can get what you want with the built in TTS support. Assuming you’re learning German and have downloaded that voice with windows 10, adding this to your back template should work:

{{tts de_DE voices=Microsoft_Hedda:2ndfield}}
1 Like

Hi, thank you for the answer. I am learning English. However, It doesn’t matter. This template only works on the desktop version. When it comes to Ankidroid, TTS play all the fields.

Ankidroid doesn’t support the native Anki syntax yet, but that may change soon: Feature request: Compatibility with Anki 2.1.20 TTS field feature · Issue #5793 · ankidroid/Anki-Android · GitHub

For the currently supported TTS mechanisms in Ankidroid see “Text to Speech” here: AnkiDroid 2.15 User Manual

And lastly, here is a supposed workaround for TTS support on both platforms without using add-ons:
I haven’t tried that myself.


Thanks. The last link has given me the answer. :slight_smile:

1 Like