Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSongs ¶
GetSongs populates the provided Music object with the song database found at the URL `songsCollectionURL`.
func InitSpeaker ¶
func InitSpeaker() error
func SelectSong ¶
SelectSong asks the user for a song from the artists Music object, and returns pointers to the selected Artist, Album, and Song object within
func SynthesiseText ¶
SynthesiseText uses the Google Cloud Text-to-Speech API to generate an MP3 audio file speaking the provided string t, and returns the file name of the created MP3 file. NB. this function requires that a valid Google API credential file is present and referred to by the 'GOOGLE_APPLICATION_CREDENTIALS' environment variable.
Types ¶
type Album ¶
Album is a structure storing the album name and a dynamic array of Song objects to represent the songs present on an album.
type Artist ¶
Artist is a structure storing the artist name and a dynamic array of Album objects to represent the artist's albums.
type Music ¶
Music is a structure storing a dynamic array within which to store the Artist objects, to be populated by parsing the JSON data file.
type Player ¶
type Player struct { // Whether the `Player` will continue playing music once the current track has concluded. ContinuingPlayback bool // contains filtered or unexported fields }
func (*Player) AdjustVolume ¶
func (*Player) TogglePause ¶
func (p *Player) TogglePause()