speech

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: BSD-3-Clause, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ref https://cloud.google.com/text-to-speech/docs/voices
	VoiceStandardA = "ja-JP-Standard-A"
	VoiceStandardB = "ja-JP-Standard-B"
	VoiceStandardC = "ja-JP-Standard-C"
	VoiceStandardD = "ja-JP-Standard-D"
	VoiceWavenetA  = "ja-JP-Wavenet-A"
	VoiceWavenetB  = "ja-JP-Wavenet-B"
	VoiceWavenetC  = "ja-JP-Wavenet-C"
	VoiceWavenetD  = "ja-JP-Wavenet-D"

	AudioEncoding_LINEAR16 = texttospeechpb.AudioEncoding_LINEAR16
	AudioEncoding_MP3      = texttospeechpb.AudioEncoding_MP3
	AudioEncoding_OGG_OPUS = texttospeechpb.AudioEncoding_OGG_OPUS
)

Variables

This section is empty.

Functions

func NewRequest

NewRequest generate perform the text-to-speech request on the text input with the selected voice parameters and audio file type.

Types

type AudioEncoding

type AudioEncoding texttospeechpb.AudioEncoding

type Speaker

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

Speaker ...

func NewSpeechClient

func NewSpeechClient(ctx context.Context) (*Speaker, error)

NewSpeechClient return a Speaker.

func (*Speaker) Run

Run ...

type SpeechOption

type SpeechOption struct {
	LanguageCode      string
	VoiceName         string
	AudioEncoding     texttospeechpb.AudioEncoding
	AudioSpeakingRate float64
	AudioPitch        float64
}

Jump to

Keyboard shortcuts

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