Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when playing audio using Native Handler more than once #31

Open
orlandoleone opened this issue Sep 4, 2024 · 1 comment
Open

Comments

@orlandoleone
Copy link

The following error occurs when I try playing audio using the Native handler more than once.

SIGSEGV: segmentation violation
PC=0x18a4e9334 m=4 sigcode=2 addr=0x0
signal arrived during cgo execution

Specifically, the first TTS audio file plays, and then the error occurs without playing the second audio file.

This is my code:

package main

import (
	htgotts "github.com/hegedustibor/htgo-tts"
	handlers "github.com/hegedustibor/htgo-tts/handlers"
	voices "github.com/hegedustibor/htgo-tts/voices"
)

func TTS() {
	speech := htgotts.Speech{Folder: "audio", Language: voices.English, Handler: &handlers.Native{}}
	speech.Speak("hello")
	speech.Speak("goodbye")
}

func main() {
	TTS()
}

How can I fix this?

@Master-of-the-Ice24
Copy link

I'll suggest to try with MPlayer and maybe call the method "Speak" 1 time only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants