speaker

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package speaker provides various sounds and effects.

Example
fmt.Println(BehindTheWall.Apply("Hello") + Chainsaw1 + " world!")
Output:

<speaker effect="behind_the_wall">Hello<speaker effect="-"><speaker audio="alice-sounds-game-win-1.opus"> world!

Index

Examples

Constants

View Source
const (
	BehindTheWall = Effect("behind_the_wall")
	Hamster       = Effect("hamster")
	Megaphone     = Effect("megaphone")
	PitchDown     = Effect("pitch_down")
	Psychodelic   = Effect("psychodelic")
	Pulse         = Effect("pulse")
	TrainAnnounce = Effect("train_announce")
)

Those contants define various effects.

View Source
const (
	Chainsaw1 = `<speaker audio="alice-sounds-game-win-1.opus">`
)

Those contants define various sounds. See https://yandex.ru/dev/dialogs/alice/doc/sounds/things-docpage/ and subpages.

Variables

This section is empty.

Functions

This section is empty.

Types

type Effect

type Effect string

Effect defines an effect you can apply to text. See https://yandex.ru/dev/dialogs/alice/doc/speech-effects-docpage/.

func (Effect) Apply

func (e Effect) Apply(text string) string

Apply wraps given text with effect.

Jump to

Keyboard shortcuts

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