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 ¶
func NewRequest(text string, opt *SpeechOption) *texttospeechpb.SynthesizeSpeechRequest
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 ¶
NewSpeechClient return a Speaker.
func (*Speaker) Run ¶
func (s *Speaker) Run(ctx context.Context, req *texttospeechpb.SynthesizeSpeechRequest) ([]byte, error)
Run ...
type SpeechOption ¶
type SpeechOption struct { LanguageCode string VoiceName string AudioEncoding texttospeechpb.AudioEncoding AudioSpeakingRate float64 AudioPitch float64 }
Click to show internal directories.
Click to hide internal directories.