(audioBase64 string, audioFormat string)
| 448 | } |
| 449 | |
| 450 | func CountAudioTokenOutput(audioBase64 string, audioFormat string) (int, error) { |
| 451 | if audioBase64 == "" { |
| 452 | return 0, nil |
| 453 | } |
| 454 | duration, err := parseAudio(audioBase64, audioFormat) |
| 455 | if err != nil { |
| 456 | return 0, err |
| 457 | } |
| 458 | return int(duration / 60 * 200 / 0.24), nil |
| 459 | } |
| 460 | |
| 461 | //func CountAudioToken(sec float64, audioType string) { |
| 462 | // if audioType == "input" { |
no test coverage detected