chore: fix some comments to improve readability (#10960)

Signed-off-by: zjuzhongwen <zjuzhongwen@outlook.com>
This commit is contained in:
zjuzhongwen
2026-07-20 06:37:40 +08:00
committed by GitHub
parent 8cef340659
commit 864c84f48b
3 changed files with 6 additions and 6 deletions

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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"