AwesomeTTS for Anki

Easily add text-to-speech to your Anki cards

Text and Cloze Deletion Configuration

AwesomeTTS configuration dialog with the Text tab selected
“Text” configuration tab

The “Text” tab allows users to control how AwesomeTTS transforms incoming text before it is sent to a TTS service to be spoken.

A number of simple transformations can be enabled that cover some common use cases. Advanced users can also define a custom list of text substitutions to perform on incoming text.

Collectively, these options can be helpful for users who keep snippets of text within their note fields that they want visually on-screen but either do not want played back or want played back in another form, particularly with shared decks that might not have had AwesomeTTS in mind. Users who are building up decks from scratch may choose to keep non-audible snippets of information in separate note fields from the actual spoken language words as an alternative to using these features.

Handling Template Text

These options are used whenever AwesomeTTS parses content that came from a template (e.g. on-the-fly <tts> tags). These options are applied after Anki has already done any needed template substitutions or cloze deletions (i.e. after the values from your note fields have already been injected into your template and after any cloze deletion patterns have been turned into what you see on-screen while studying).

Handling Text from a Note Field

These options are used whenever AwesomeTTS parses content that came from a note field (e.g. when mass generating audio files in the browser editor, or for prepopulating the input text field from the note’s active field when adding audio files in the note editor).

Simple Options

Cloze Deletion Handling

Cloze deletions can be used within Anki for chopping out a bit of text inside of a larger note that the studier must recall. For more about cloze deletion or how Anki implements it within cards, see the cloze deletion topic in the manual. The cloze options will let you control how AwesomeTTS handles these.

if your note field had…Hello {{c1::world}}!Hello {{c1::world::place}}!
then on a card front, Anki would render…Hello [...]!Hello [place]!
then with “read however Anki displayed it” /
    “read as Anki would display on a card front”,
AwesomeTTS would read…
Hello ... !Hello place!
or with “read w/ hint wrapped in ellipses” /
    “replace w/ hint wrapped in ellipses”,
AwesomeTTS would read…
Hello ... !Hello ... place ... !
or with “replace w/ deleted text” (notes only),
AwesomeTTS would read…
Hello world!Hello world!
or with “read as an ellipsis, ignoring hint” /
    “replace w/ ellipsis, ignoring both”,
AwesomeTTS would read…
Hello ... !Hello ... !
or with “remove entirely”,
AwesomeTTS would read…
Hello !Hello !

In addition, if you are using cloze with on-the-fly playback, and you only want the revealed text to be spoken on the answer side (e.g. you have a <tts> tag around the same field on both sides of your template), you can do so by checking “For cloze answers, read revealed text only”.

{{hint}} Fields

If AwesomeTTS encounters the output of a {{hint}} within one of your <tts> template tags, you can instruct AwesomeTTS to omit it from the spoken playback by checking “Ignore {{hint}} fields”. Please note that this option does not affect the "hints" that are associated with cloze deletions, but rather specifically the use of the {{hint}} tag.

Counting Adjacent Characters

If you use some character in your notes to denote a blank to be filled in, and you want AwesomeTTS to tell you how many characters that blank was, you can activate this feature.

For example, if your note said The grass is always _______ on the other ____, and you entered an underscore into “count adjacent characters” with “wrap in ellipses” checked, AwesomeTTS will read The grass is always ... 7 ... on the other ... 4 ... as the phrase.

Advanced Handling

AwesomeTTS configuration dialog showing the advanced text panel
User-configured advanced substitution list

If you have specific strings of text from your input that you want to transform or remove, you can do so in the “Advanced” panel.

The “regex” checkbox will allow you to use regular expression patterns to perform advanced matching and replacement. For example, many users will find the use of \b (match a word boundary) helpful in formulating match patterns. Additionally, users may use substitution placeholders (e.g. \2) in the replacement text. More information about regular expressions can be found on Wikipedia.

The “unicode” checkbox will enable some international functionality for the matcher, such as being able to use meta classes to match non-ASCII alphabetical characters.

If you want to remove the matched text rather than substitute it, you can leave the second text input blank.

AwesomeTTS will run these rules in the order that you specify after all the simple rules have already run, and will normalize whitespace and ellipses before each rule is run.

Other Notes