Skip to content

Commit

Permalink
gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielluizsf committed May 23, 2024
1 parent 1a1cec2 commit 8aa6c77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions example/audio.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ var (
audioFilePath = fmt.Sprintf("./temp/%s", fileName)
)

func AudioGenerated(filePath string)bool{
func AudioGenerated(filePath string) bool {
return fileExists(filePath)
}

func tts() {
fileExists := AudioGenerated(audioFilePath)
if !fileExists{
if !fileExists {
audio, openaiErr := openai.TextToSpeech(client, httpClient, &openai.SpeechRequestBody{
Model: "tts-1",
Input: "Hello",
Voice: openai.SpeechVoices.Onyx,
})
if openaiErr != nil {
b, err := json.Marshal(openaiErr)
if err != nil{
if err != nil {
panic(err)
}
log.Fatal(string(b))
Expand Down

0 comments on commit 8aa6c77

Please sign in to comment.