diff --git a/audio.go b/audio.go index 6d1681a51..9cc5c5172 100644 --- a/audio.go +++ b/audio.go @@ -79,6 +79,7 @@ func audioMultipartForm(request AudioRequest, w *multipart.Writer) error { if err != nil { return fmt.Errorf("opening audio file: %w", err) } + defer f.Close() fw, err := w.CreateFormFile("file", f.Name()) if err != nil {