anki

package
v0.0.0-...-e70395a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Anki

type Anki struct {
	// contains filtered or unexported fields
}

Anki is for handling Anki related features.

func NewAnki

func NewAnki(ankiMedia string) (*Anki, error)

NewAnki validates parameters and creates a new Anki.

func (*Anki) Download

func (anki *Anki) Download(target string) (string, error)

Download get the content of target URL and save it as <ankiMedia>/<sha1hash>.<ext>. This returns only the basename of the file, <sha1hash>.<ext>.

func (*Anki) TTS

func (anki *Anki) TTS(text string) (string, error)

TTS generates an audio file from test using Google Cloud Text-to-Speech API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL