فهرست منبع

chore: 移除无用代码

CaIon 1 سال پیش
والد
کامیت
408c2bdd9b
1فایلهای تغییر یافته به همراه0 افزوده شده و 12 حذف شده
  1. 0 12
      relay/relay-audio.go

+ 0 - 12
relay/relay-audio.go

@@ -20,15 +20,6 @@ import (
 	"time"
 )
 
-var availableVoices = []string{
-	"alloy",
-	"echo",
-	"fable",
-	"onyx",
-	"nova",
-	"shimmer",
-}
-
 func AudioHelper(c *gin.Context, relayMode int) *dto.OpenAIErrorWithStatusCode {
 	tokenId := c.GetInt("token_id")
 	channelType := c.GetInt("channel")
@@ -59,9 +50,6 @@ func AudioHelper(c *gin.Context, relayMode int) *dto.OpenAIErrorWithStatusCode {
 		if audioRequest.Voice == "" {
 			return service.OpenAIErrorWrapper(errors.New("voice is required"), "required_field_missing", http.StatusBadRequest)
 		}
-		if !common.StringsContains(availableVoices, audioRequest.Voice) {
-			return service.OpenAIErrorWrapper(errors.New("voice must be one of "+strings.Join(availableVoices, ", ")), "invalid_field_value", http.StatusBadRequest)
-		}
 	}
 	var err error
 	promptTokens := 0