libroberto

package module
v0.0.0-...-c864ae4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 18 Imported by: 0

README

libRoberto

Go Report Card

libRoberto - A library for generating dumb phrases and audio files with Loquendo Roberto voice

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Gods holds, well, the gods
	Gods = []string{"Dio", "Gesù", "Madonna"}
	// Adjectives holds a list of adjectives in italian
	Adjectives []string
)
View Source
var (
	// Voice used to generate audio files
	Voice = "Roberto"
)

Functions

func Bestemmia

func Bestemmia() string

Bestemmia generates a bestemmia

func CmdsKill

func CmdsKill(cmds []*exec.Cmd)

CmdsKill kills all the exec.Cmd inside the slice

func CmdsStart

func CmdsStart(cmds []*exec.Cmd)

CmdsStart starts all the exec.Cmd inside the slice

func CmdsWait

func CmdsWait(cmds []*exec.Cmd)

CmdsWait waits for all the exec.Cmd inside the slice to finish processing, to free up resources

func EmojiToDescription

func EmojiToDescription(str string) string

EmojiToDescription converts all the occurrences of an emoji with its description

func GenAudio

func GenAudio(text, format string, timeOut time.Duration) string

GenAudio generates a file from a string with the given format, returning its UUID (aka SHA1 hash of the text)

func GenAudioPipes

func GenAudioPipes(text, format string) []*exec.Cmd

GenAudioPipes returns a slice of exec.Cmd with commands to start. The stdout of the last element will contain the stream. The stream will be in the format specified by the format parameter

func GenDCA

func GenDCA(text string) []*exec.Cmd

GenDCA returns a slice of exec.Cmd with commands to start. The stdout of the last element will contain the DCA stream

func GenUUID

func GenUUID(text string) string

GenUUID generates the UUID for the given text

func GetCovid

func GetCovid() string

GetCovid gets data about Italy's cases

func GetWikipedia

func GetWikipedia(link string) string

GetWikipedia returns the first paragraph of the give article

func SearchAndGetTrain

func SearchAndGetTrain(trainID string) string

SearchAndGetTrain creates an announcement for the given trainID, if it exists

Types

type Emoji

type Emoji []struct {
	Descrizione string `json:"descrizione"`
	Emoji       string `json:"emoji"`
}

Emoji holds info about an emoji

Jump to

Keyboard shortcuts

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