Skip to content

krmanik/anki-tts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Anki TTS

MS Edge TTS in Anki Card Template.

Usage

Add following script tag at top in Anki Card Template using note editor.

<script src="https://cdn.jsdelivr.net/npm/anki_tts@latest/src/anki_tts.js"></script>

Then update the playTts method, change {{Front}} to field name. Lets say if field name in note type is Hanzi, then replace it with {{Hanzi}}. Copy following method to Card template.

<script>
    function playTts() {
        let text = '{{Front}}';   // <-----   change Front to field name in card template

        let [ttsLocale, ttsSublocale] = getLocal();
        edgeTtsPlay(text, ttsSublocale);
    }
</script>

Click on config button during review to set language and set config.

Then click play to text to speech

Credits

About

MS Edge TTS in Anki Card Template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published