How to get TTS to not say "blank" and not "cloze" at each cloze deletion

I am trying to add TTS to cards, but the audio says “c1” and “c2” (and so on) instead of “blank” at each cloze. It also does this on the backs of cards, when I need it to just read the answer normally. Ultimately, this is what I am looking for:

  • Front: reads text and says “blank” at each cloze

  • Back: reads text without saying “blank” at each cloze

This is my current code for both the front and back of the cards:

<!-- ##############  Text-to-speech  ##############
replace the arrows/dashes from the statement below with double curly brackets-->

{{tts en_US voices=Apple_Samantha_(English_(US)) speed=1.3:Text}}

I have tried various edits to this code based on findings from here and ChatGPT, but nothing seems to work.

Thank you in advance!

Did you try the instructions? Field Replacements - Anki Manual

I did, but I could not find what I was looking for :confused:

Look for the word “cloze.”

Previous responses: Reddit - The heart of the internet

It’s not clear whether you’ve tried the method in the manual, or whether you’ve dismissed it as not what you want based on the description. Try it, and if it isn’t working for you, my suggestions in my first response on Reddit still apply – if you’re trying to duplicate functionality from another note/note type, the easiest way to do that is to do what that note/note type is doing.

This code works for me on the default cloze note type:

{{tts en_US:cloze:Text}}

So it must be the template interfering.

Try putting the code at the end of the template, below all the JavaScript magic.

If that doesn’t work, you can make your own copy of the cloze note type and copy the important bits from the AnKing template.

1 Like