openai tts

This commit is contained in:
Sakurasan
2023-11-22 22:51:24 +08:00
parent 409bfe2cef
commit e322e09833
4 changed files with 102 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ import (
"net/url"
"opencatd-open/pkg/azureopenai"
"opencatd-open/pkg/claude"
oai "opencatd-open/pkg/openai"
"opencatd-open/pkg/tokenizer"
"opencatd-open/store"
"os"
@@ -480,6 +481,10 @@ func HandleProy(c *gin.Context) {
WhisperProxy(c)
return
}
if c.Request.URL.Path == "/v1/audio/speech" {
oai.SpeechHandler(c)
return
}
if c.Request.URL.Path == "/v1/chat/completions" && localuser {
if store.KeysCache.ItemCount() == 0 {