You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
488 B

  1. package main
  2. import (
  3. "fmt"
  4. "os/exec"
  5. "strings"
  6. )
  7. func festivalEn(text string) {
  8. path, err := exec.LookPath("festival")
  9. if err != nil {
  10. return
  11. }
  12. festival := exec.Command(path, "--tts")
  13. reader := strings.NewReader(text)
  14. festival.Stdin = reader
  15. err = festival.Run()
  16. if err != nil {
  17. fmt.Println("error")
  18. }
  19. }
  20. func 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. }