1
0

ditching ffmpeg, acceptable image size

This commit is contained in:
2021-01-28 16:25:59 +01:00
parent 57249618c0
commit 939692e531
2 changed files with 7 additions and 7 deletions

View File

@ -42,8 +42,8 @@ func playSound(s *discordgo.Session, guildID, channelID string, audioBuffer []by
func getAudioMessage(msg string) (filename string, out []byte) {
curr_time := time.Now().Unix()
filename = fmt.Sprintf("%d.ogg", curr_time)
var cmd_args string = fmt.Sprintf("espeak-ng -s 120 -v mb-fr2 -p 30 '%s' --stdout | ffmpeg -i - -c:a libopus -f ogg pipe:1 2>/dev/null",
filename = fmt.Sprintf("%d.wav", curr_time)
var cmd_args string = fmt.Sprintf("espeak-ng -s 120 -v mb-fr2 -p 30 '%s' --stdout",
maxString(msg, 300))
cmd := exec.Command("sh", "-c", cmd_args)
out, err := cmd.CombinedOutput()