hypertts tips and tricks

This page covers various techniques when using HyperTTS. Starting from scratch ? Take a look at our our HyperTTS tutorial for beginners
Table of contents:

adding audio only to notes which are missing audio

When populating audio for large decks which may already have some audio, you may want to skip notes which already have audio. You can achieve this by entering a filter string in the Anki browser. In this case, I want to find notes in the Mandarin deck which have an empty Sound field.
The following query works: deck:Mandarin Sound:

If your audio tag is inside a text field, you'll need to look for notes which don't have the mp3 string, and you can use the following query: deck:Mandarin -mp3 (show notes in the Mandarin deck which don't contain the text mp3).

what are all the different ways of adding audio ?

This only applies to Collection audio. When using Realtime audio, you only need to configure a single note, and every other note of the same time will have audio.

To add audio to multiple notes, go to the Anki browser, and go to HyperTTS menu. You'll find the Add Audio (Collection)... entry. You can select as many notes as you wish before selecting this menu entry.
If you already have a preset, you'll see entries such as Add Audio (Collection): <My Preset>. This allows you to quickly use your presets on many notes at once.
These are the preferred options for people who mass-populate decks with Audio, or perhaps after importing a number of new notes, for example after a language lesson.

On the other hand, some people prefer to add audio to notes one by one. This may be because they are entering notes directly into Anki, or maybe they are carefully editing notes through the Anki editor. To add audio to a single note from the editor, use the HyperTTS toolbar on the top-right of the editor. It should be present whether you are editing an existing note, or adding a new one

Clicking Add Audio while New Preset is selected will allow you to configure the audio. However once you're satisfied with the settings, you should save them into a preset, from that point on you'll be able to add audio with a single click using that same toolbar, after making sure your preset is selected. This will allow you to very quickly add audio with the same parameters. For even more efficiency, you can configure a keyboard shortcut, configurable from the Anki main screen, from the Tools -> HyperTTS: Preferences menu.

how to add pauses in the audio ?

In some cases, you may want to add pauses to the audio, at the beginning, the end, or in the middle. There are various reasons why one might want to do this:

Pauses can be added for all services that support SSML (Speech Synthesis Markup Language). Azure, Google, Amazon, Watson and others support SSML, and hence allow various customizations, but in this case we'll focus on a single SSML tag to introduce pauses. The syntax is <break time="800ms"/>. You can change the duration by using a larger number such as 800ms (800 milliseconds), or 3s (3 seconds). In the screenshot below, we've added a replacement rule to replace the slash with an SSML break statement. The audio will hence sound like "cram school <800ms pause> after school study".

You can also systematically add a pause at the beginning, by adding a Regex Rule which replaces ^ with <break time="800ms"/>. You should see the SSML tag appear in the grid on the right side in the Processed Text column to verify your replacement is correct. The audio preview should also confirm you've added the pause in the right place.

The end !

This is the end of the tutorial. If you have any questions, please email languagetools@mailc.net. Are you interested in trying AwesomeTTS , HyperTTS or Language Tools, to easily add Audio / Translation / Transliteration to your flashcards ? Signup for AwesomeTTS Plus.