Skip to content

Commit 864c84f

Browse files
authored
chore: fix some comments to improve readability (#10960)
Signed-off-by: zjuzhongwen <zjuzhongwen@outlook.com>
1 parent 8cef340 commit 864c84f

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

backend/go/parakeet-cpp/goparakeetcpp.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -767,10 +767,6 @@ func (p *ParakeetCpp) AudioTranscriptionStream(ctx context.Context, opts *pb.Tra
767767
return nil
768768
}
769769

770-
// decodeWavMono16k converts any input audio to 16 kHz mono PCM and returns the
771-
// float samples plus the clip duration in seconds. Mirrors the whisper
772-
// backend: utils.AudioToWav (ffmpeg) normalises rate/channels, go-audio
773-
// decodes the PCM.
774770
// convertToWavMono16k converts an arbitrary audio file to a 16 kHz mono WAV in
775771
// a fresh temp dir and returns the path together with a cleanup func the caller
776772
// 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) {
792788
return converted, cleanup, nil
793789
}
794790

791+
// decodeWavMono16k converts any input audio to 16 kHz mono PCM and returns the
792+
// float samples plus the clip duration in seconds. Mirrors the whisper
793+
// backend: utils.AudioToWav (ffmpeg) normalises rate/channels, go-audio
794+
// decodes the PCM.
795795
func decodeWavMono16k(path string) ([]float32, float32, error) {
796796
converted, cleanup, err := convertToWavMono16k(path)
797797
if err != nil {

core/config/backend_capabilities.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ func PossibleUsecasesForBackend(backend string) []string {
797797
return nil
798798
}
799799

800-
// DefaultUsecasesForBackend returns the conservative default usecases.
800+
// DefaultUsecasesForBackendCap returns the conservative default usecases.
801801
// Returns nil if the backend is unknown.
802802
func DefaultUsecasesForBackendCap(backend string) []string {
803803
if cap := GetBackendCapability(backend); cap != nil {

core/http/endpoints/localai/backend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func (mgs *BackendEndpointService) ListBackendsEndpoint() echo.HandlerFunc {
251251
}
252252
}
253253

254-
// ListModelGalleriesEndpoint list the available galleries configured in LocalAI
254+
// ListBackendGalleriesEndpoint lists the available backend galleries configured in LocalAI.
255255
// @Summary List all Galleries
256256
// @Tags backends
257257
// @Success 200 {object} []config.Gallery "Response"

0 commit comments

Comments
 (0)