MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / GetAudioRatio

Function GetAudioRatio

setting/ratio_setting/model_ratio.go:562–582  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

560}
561
562func GetAudioRatio(name string) float64 {
563 if strings.Contains(name, "-realtime") {
564 if strings.HasSuffix(name, "gpt-4o-realtime-preview") {
565 return 8
566 } else if strings.Contains(name, "gpt-4o-mini-realtime-preview") {
567 return 10 / 0.6
568 } else {
569 return 20
570 }
571 }
572 if strings.Contains(name, "-audio") {
573 if strings.HasPrefix(name, "gpt-4o-audio-preview") {
574 return 40 / 2.5
575 } else if strings.HasPrefix(name, "gpt-4o-mini-audio-preview") {
576 return 10 / 0.15
577 } else {
578 return 40
579 }
580 }
581 return 20
582}
583
584func GetAudioCompletionRatio(name string) float64 {
585 if strings.HasPrefix(name, "gpt-4o-realtime") {

Callers 3

calculateAudioQuotaFunction · 0.92
PostWssConsumeQuotaFunction · 0.92
PostAudioConsumeQuotaFunction · 0.92

Calls 1

ContainsMethod · 0.80

Tested by

no test coverage detected