babel

package module
v0.0.0-...-32c6531 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleListVoices

func HandleListVoices(w http.ResponseWriter, r *http.Request)

HandleListVoices lists all Journey voices

func HandleSynthesis

func HandleSynthesis(w http.ResponseWriter, r *http.Request)

HandleSynthesis receives the request and creates all voices

func ListJourneyVoices

func ListJourneyVoices() ([]*texttospeechpb.Voice, error)

ListJourneyVoices returns all voices with "Journey" in the name

Types

type BabelOutput

type BabelOutput struct {
	VoiceName    string `json:"voice_name"`
	LanguageCode string `json:"language_code"`
	Text         string `json:"text"`
	AudioPath    string `json:"audio_path"`
	Gender       string `json:"gender"`
	Error        string `json:"-"`
}

BabelOutput represents the metatdata for the translated audio generated

type BabelRequest

type BabelRequest struct {
	Statement string `json:"statement"`
}

BabelRequest represents the request to the service

type BabelResponse

type BabelResponse struct {
	AudioMetadata []BabelOutput `json:"audio_metadata"`
}

BabelResponse represents the response from the service

type VoiceMetadata

type VoiceMetadata struct {
	Name          string   `json:"name"`
	Gender        string   `json:"gender"`
	LanguageCodes []string `json:"language_codes"`
}

VoiceMetadata is a minimal set of tts voice metadata

Jump to

Keyboard shortcuts

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