1.0.1 • Published 1 year ago

anki_tts v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

npm.io

npm.io

Credits

1.0.1

1 year ago

1.0.0

1 year ago