composer

package
v0.0.0-...-834292d Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PronounceDecimal

func PronounceDecimal(f float64, precision int, separator string) string

PronounceFractional pronounces the given float as a sequence of digits

func PronounceInt

func PronounceInt(d int) string

PronounceInt pronounces the given integer as a sequence of digits.

func PronounceNumbers

func PronounceNumbers(s string) string

PronounceNumbers pronounces the digits in the given string as a sequence of digits. Non-digit characters are ignored.

Types

type Composer

Composer converts brevity responses from structured forms into natural language. It is nondeterministic; the same input may randomly produce different output, to add variety and personality to the bot's respones.

func New

func New() Composer

type NaturalLanguageResponse

type NaturalLanguageResponse struct {
	// Subtitle is how the response will be displayed as in-game text.
	Subtitle string
	// Speech is the input to the TTS provider.
	Speech string
}

NaturalLanguageResponse contains the composer's responses in text form.

Jump to

Keyboard shortcuts

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