How to use male TTS voice on Android?

My deck (which i use on both Windows and Ankidroid) uses two card types. For the speech line, one uses,

{{tts fr_FR voices=Microsoft_Paul,fr-FR:French}}

The other uses:

{{tts fr_FR voices=Microsoft_Julie,fr-FR:French}}

Ankidroid skips Paul and Julie (expected) and falls back to its default female french voice. I wish for Ankidroid to use a male TTS voice for the card type that uses Paul though.

Android gives this list for voices:

  • fr FR
  • fra
  • frb
  • frc
  • frd
  • vlf

frd is male, and sounds like a good candidate, but I’m at a loss for how to make the Ankidroid use it. frd doesn’t work. fr-frd doesn’t work.

Is it even possible?

The list of voices you get from AnkiDroid should give you the exact format for how to use it in a template. See Field Replacements - Anki Manual for how to get that list, and how to string multiple voices together.

I’d been staring at the manual and fiddling with the tags for a while before asking for help. The list Android gives is the one I provided, but it turns out getting the required string is a bit more involved. I had to go through three screens then take a screenshot of the third so I could read the required value on my desktop computer because it was far too small to read on my phone screen.

In case anyone falls upon this page while looking for the same help, to get the voice string off Ankidroid, first do the obvious and insert this in your template: {{tts-voices:}}.

When you look at the card in AnkiDroid click the Open TTS voices settings Link:

Then find the voice you want and click the ‘copy’ symbol.

A pink blob will then appear in the bottom left of the screen and if your eyesight is anything like mine (not great, not terrible), you won’t be able to read it. So maybe transfer it to a computer like I did.

So the voice string I apparently needed was:

“com.google.android.tts-fr-fr-x-frd-local”

So this is the tag I needed to get a male voice on Anki (Windows), a male voice on Ankidroid, and I believe fr-FR means it falls back to whatever alternative is available:

{{tts fr_FR voices=Microsoft_Paul,com.google.android.tts-fr-fr-x-frd-local,fr-FR:French}}

Since you just copied it, you can go to your card template and paste it there directly. That pop-up is there so you know something was copied, not for you to read and memorize the code.

Recent versions of Android have certainly made a mess of the TTS voice codes, which by my recollection used to be a bit more legible. Unfortunately AnkiDroid is stuck with using whatever code Android demands to invovke built-in TTS.

Since you just copied it, you can go to your card template and paste it there directly. That pop-up is there so you know something was copied, not for you to read and memorize the code.

I’m aware of that, but I’m not risking editing my templates in an unfamiliar Android app I downloaded for the first time yesterday. I’m creating templates on the desktop version of Anki and I wish to continue editing them there.

It also wasn’t obvious to me what the text in that tiny box even said or that it was signalling “hey, something was just copied to your clipboard!” The colour even made me wonder if an error had occurred. So it was easier to just take a screenshot and use my PC to grab the version uploaded to the cloud in order to read the text.