arnaucube
arnaucube/twitterReaderPublic Self-hosted repository
twitterReader/festival.go
festival.goRaw
 1package main
 2
 3import (
 4	"fmt"
 5	"os/exec"
 6	"strings"
 7)
 8
 9func festivalEn(text string) {
10	path, err := exec.LookPath("festival")
11	if err != nil {
12		return
13	}
14	festival := exec.Command(path, "--tts")
15	reader := strings.NewReader(text)
16	festival.Stdin = reader
17	err = festival.Run()
18}
19
20func festivalCa(text string) {
21	out, err := exec.Command("bash", "readCa.sh", text).Output()
22	if err != nil {
23		fmt.Println("error")
24	}
25	fmt.Println(string(out))
26}