mirror of
https://github.com/mudler/LocalAI.git
synced 2026-08-02 11:30:44 -04:00
chore: fix some comments to improve readability (#10960)
Signed-off-by: zjuzhongwen <zjuzhongwen@outlook.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user