1
0

audio.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. package dto
  2. type AudioRequest struct {
  3. Model string `json:"model"`
  4. Input string `json:"input"`
  5. Voice string `json:"voice"`
  6. Speed float64 `json:"speed,omitempty"`
  7. ResponseFormat string `json:"response_format,omitempty"`
  8. }
  9. type AudioResponse struct {
  10. Text string `json:"text"`
  11. }
  12. type WhisperVerboseJSONResponse struct {
  13. Task string `json:"task,omitempty"`
  14. Language string `json:"language,omitempty"`
  15. Duration float64 `json:"duration,omitempty"`
  16. Text string `json:"text,omitempty"`
  17. Segments []Segment `json:"segments,omitempty"`
  18. }
  19. type Segment struct {
  20. Id int `json:"id"`
  21. Seek int `json:"seek"`
  22. Start float64 `json:"start"`
  23. End float64 `json:"end"`
  24. Text string `json:"text"`
  25. Tokens []int `json:"tokens"`
  26. Temperature float64 `json:"temperature"`
  27. AvgLogprob float64 `json:"avg_logprob"`
  28. CompressionRatio float64 `json:"compression_ratio"`
  29. NoSpeechProb float64 `json:"no_speech_prob"`
  30. }