From 864c84f48b1777a8d8f12f8e171b0f18f28496ea Mon Sep 17 00:00:00 2001 From: zjuzhongwen Date: Mon, 20 Jul 2026 06:37:40 +0800 Subject: [PATCH] chore: fix some comments to improve readability (#10960) Signed-off-by: zjuzhongwen --- backend/go/parakeet-cpp/goparakeetcpp.go | 8 ++++---- core/config/backend_capabilities.go | 2 +- core/http/endpoints/localai/backend.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/go/parakeet-cpp/goparakeetcpp.go b/backend/go/parakeet-cpp/goparakeetcpp.go index 5e023e927..23e5c548c 100644 --- a/backend/go/parakeet-cpp/goparakeetcpp.go +++ b/backend/go/parakeet-cpp/goparakeetcpp.go @@ -767,10 +767,6 @@ func (p *ParakeetCpp) AudioTranscriptionStream(ctx context.Context, opts *pb.Tra return nil } -// decodeWavMono16k converts any input audio to 16 kHz mono PCM and returns the -// float samples plus the clip duration in seconds. Mirrors the whisper -// backend: utils.AudioToWav (ffmpeg) normalises rate/channels, go-audio -// decodes the PCM. // convertToWavMono16k converts an arbitrary audio file to a 16 kHz mono WAV in // a fresh temp dir and returns the path together with a cleanup func the caller // must defer. WAV inputs already at 16 kHz/mono/16-bit are passed through by @@ -792,6 +788,10 @@ func convertToWavMono16k(path string) (string, func(), error) { return converted, cleanup, nil } +// decodeWavMono16k converts any input audio to 16 kHz mono PCM and returns the +// float samples plus the clip duration in seconds. Mirrors the whisper +// backend: utils.AudioToWav (ffmpeg) normalises rate/channels, go-audio +// decodes the PCM. func decodeWavMono16k(path string) ([]float32, float32, error) { converted, cleanup, err := convertToWavMono16k(path) if err != nil { diff --git a/core/config/backend_capabilities.go b/core/config/backend_capabilities.go index 479a80cda..6605bcf39 100644 --- a/core/config/backend_capabilities.go +++ b/core/config/backend_capabilities.go @@ -797,7 +797,7 @@ func PossibleUsecasesForBackend(backend string) []string { return nil } -// DefaultUsecasesForBackend returns the conservative default usecases. +// DefaultUsecasesForBackendCap returns the conservative default usecases. // Returns nil if the backend is unknown. func DefaultUsecasesForBackendCap(backend string) []string { if cap := GetBackendCapability(backend); cap != nil { diff --git a/core/http/endpoints/localai/backend.go b/core/http/endpoints/localai/backend.go index cb4507249..1dd76f654 100644 --- a/core/http/endpoints/localai/backend.go +++ b/core/http/endpoints/localai/backend.go @@ -251,7 +251,7 @@ func (mgs *BackendEndpointService) ListBackendsEndpoint() echo.HandlerFunc { } } -// ListModelGalleriesEndpoint list the available galleries configured in LocalAI +// ListBackendGalleriesEndpoint lists the available backend galleries configured in LocalAI. // @Summary List all Galleries // @Tags backends // @Success 200 {object} []config.Gallery "Response"