Skip to content

On the fly TTS

LucW edited this page Mar 25, 2021 · 2 revisions

What is on-the-fly TTS ?

With on-the-fly TTS, you don't need to generate audio for your cards ahead of time. You can simply add a tag to your card templates, and AwesomeTTS will read it as you review your cards.

Do I want batch-generation or on-the-fly TTS ?

This can be a matter of preference. If you need your deck to have the exact same audio (same voice, same service) while reviewing on mobile apps, then batch-generation is the only option. If you want TTS for cloze cards, then on-the-fly TTS is the only possible option.

Compatibility with other Anki apps

AwesomeTTS 1.24 and above uses the same TTS tag as Anki desktop (and AnkiMobile/iOS). The tag looks like this:

{{tts zh_CN voices=AwesomeTTS:Chinese}}

This new tag format will allow compatibility with mobile apps (currently supported in AnkiMobile/iOS, and will be supported in AnkiDroid in the future).

How to add the TTS tag

Follow these steps:

  1. Tools -> Manage Note Types
  2. Select your Note Type
  3. Click the Cards... button
  4. Select either the Front, or the Back template
  5. remove any existing tag (that format is now obsolete)
  6. Click the Add TTS button at the bottom
  7. Select the preset you would like to use (or create a new preset). Note you can't just configure a service and voice without saving to a preset, you need a preset. Note that you can pick a group also, it should appear below presets in the presets dropdown.
  8. On the right side, select the Field which should be pronounced
  9. In Type, select from the following option:
    • Regular: the field should be pronounced in its entirety
    • Cloze field: speak non-hidden parts of front, speak everything on back: only use this for cloze fields. The audio on the front will contain everything except for the hidden word (which you have to guess), and the audio on the back will contain everything.
    • Cloze field: hidden part only, on back side only: only use this for cloze fields. Only the hidden word will be pronounced, and nothing else. It only makes to use this on the back side.
  10. Select the correct Language. It's important to select this correctly, otherwise AnkiMobile/iOS will get confused.
  11. You will see a message telling you that the language has been associated with your preset or group.
  12. Save your card template.
  13. Try reviewing a card and see whether the audio is now playing.

Note: the only supported way to add the tag is to use the Add TTS tag from the Card Template screen. You'll notice that the TTS tag doesn't refer to your service, preset or group. The association happens as you insert the tag from the dialog.