voices

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 17 Imported by: 0

README

voices

This is a simple tool to convert text to speech using API or offline tools.

Supported

  • Bing Speech API
  • Mac Say

Usage

voices -v Xiaoxiao Hello world

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PlayMp3

func PlayMp3(ctx context.Context, filename string) error

func ToMp3

func ToMp3(ctx context.Context, in, out string) error

func VoiceLanguage

func VoiceLanguage(language string) func(opt *voicesOpt)

func VoiceName

func VoiceName(name string) func(opt *voicesOpt)

Types

type Opt

type Opt func(opt *voicesOpt)

type Voice

type Voice interface {
	Name() string
	Language() string
	Detail() string
	Say(ctx context.Context, word string) error
	Cache(ctx context.Context, word string) (string, error)
}

type Voices

type Voices interface {
	Voices(opts ...Opt) ([]Voice, error)
}

func BingSayVoices

func BingSayVoices() Voices

func MacSayVoices

func MacSayVoices() Voices

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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