Files
team-api/relay/handler/audio_handler.go
T
2026-05-10 12:21:27 +08:00

24 lines
1.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package handler
import (
"context"
"net/http"
"github.com/qianfree/team-api/relay/common"
)
// HandleAudioSpeech 处理 /v1/audio/speech 请求(TTS)
func HandleAudioSpeech(ctx context.Context, body []byte, path string, headers http.Header, rc *RelayContext, provider common.DataProvider, billing common.BillingProvider) (*common.Usage, *BillingResult, error) {
return RelayHandler(ctx, body, path, headers, rc, provider, billing)
}
// HandleAudioTranscription 处理 /v1/audio/transcriptions 请求(STT)
func HandleAudioTranscription(ctx context.Context, body []byte, path string, headers http.Header, rc *RelayContext, provider common.DataProvider, billing common.BillingProvider) (*common.Usage, *BillingResult, error) {
return RelayHandler(ctx, body, path, headers, rc, provider, billing)
}
// HandleAudioTranslation 处理 /v1/audio/translations 请求
func HandleAudioTranslation(ctx context.Context, body []byte, path string, headers http.Header, rc *RelayContext, provider common.DataProvider, billing common.BillingProvider) (*common.Usage, *BillingResult, error) {
return RelayHandler(ctx, body, path, headers, rc, provider, billing)
}