Pre-processing Russian text for the AwesomeTTS add-on in Anki

The Anki add-on AwesomeTTS has been a vital tool for language learners using the Anki application on the desktop. It allows you to have elements of the card read aloud using text-to-speech capabilities. The new developer of the add-on has added a number of voice options, including the Microsoft Azure voices. The neural voices for Russian are quite good. But they have one major issue, syllabic stress marks that are sometimes seen in text intended for language learners cause the Microsoft Azure voices to grossly mispronounce the word.

For example, the sentence Цензу́ра потака́ет извращённому уму́ больше, чем сло́во из трёх букв само́ по себе. is incorrectly pronounced because it has stress marks and because the letter ë is correctly displayed. Apparently Microsoft Azure doesn’t like it when ë is correctly rendered.

Fortunately, there’s a text pre-processor built into the plugin. Here is how to use this pre-processor to change the text that’s fed to the TTS provider:

In the add-on configuration view, navigate to Text → Advanced and add two rules:

  1. The first rule basically just strips the Unicode accent grave character (U+0301) from any vowels.
  2. The second rule transliterates ë to e . Yes, it offends me to do this because they are two different letters in the Russian alphabet, but it appears that the models were trained on text written in the way that’s often encountered, unfortunately.

With those two rules in place, the pronounciations going to Microsoft Azure should be correct.

Factor analysis of failed language cards in Anki

After developing a rudimentary approach to detecting resistant language learning cards in Anki, I began teasing out individual factors. Once I was able to adjust the number of lapses for the age of the card, I could examine the effect of different factors on the difficulty score that I described previously.

Findings

Some of the interesting findings from this analysis:

  • Prompt-answer direction - 62% of lapses were in the Russian → English (recognition) direction.1
  • Part of speech - Over half (51%) of lapses were among verbs. Since the Russian verbal system is rich and complex, it’s not surprising to find that verb cards often fail.
  • Noun gender - Between a fifth and a quarter (22%) of all lapses were among neuter nouns and among failures due to nouns only, neuter nouns represented 69% of all lapses. This, too, makes intuitive sense because neuter nouns often represent abstract concepts that are difficult to represent mentally. For example, the Russian words for community, representation, and indignation are all neuter nouns.

Interventions

With a better understanding of the factors that contribute to lapses, it is easier to anticipate failures before they accumulate. For example, I will immediately implement a plan to surround new neuter nouns with a larger variety of audio and sample sentence cards. For new verbs, I’ll do the same, ensuring that I include multiple forms of the verb, varying the examples by tense, number, person, aspect and so on.

Future directions

I’d like to extend this approach to a more statistically-rigorous prediction scheme, so that I can more accurately target efforts to prevent the accumulation of lapses.

References


  1. Note that the fractions in the fx all lapses column for the card direction group do not add up to 1.0 because I excluded a minute number of image cards from the analysis. ↩︎