support tts

This commit is contained in:
CaIon
2023-11-15 21:05:14 +08:00
parent 16ad764f9b
commit 63cd3f05f2
7 changed files with 81 additions and 13 deletions

View File

@@ -37,7 +37,9 @@ var ModelRatio = map[string]float64{
"text-davinci-003": 10,
"text-davinci-edit-001": 10,
"code-davinci-edit-001": 10,
"whisper-1": 15, // $0.006 / minute -> $0.006 / 150 words -> $0.006 / 200 tokens -> $0.03 / 1k tokens
"whisper-1": 15, // $0.006 / minute -> $0.006 / 150 words -> $0.006 / 200 tokens -> $0.03 / 1k tokens
"tts-1": 7.5, // 1k characters -> $0.015
"tts-1-hd": 15, // 1k characters -> $0.03
"davinci": 10,
"curie": 10,
"babbage": 10,

View File

@@ -207,3 +207,12 @@ func String2Int(str string) int {
}
return num
}
func StringsContains(strs []string, str string) bool {
for _, s := range strs {
if s == str {
return true
}
}
return false
}