github.com/instill-ai/component@v0.16.0-beta/pkg/connector/openai/v0/text_to_speech.go (about) 1 package openai 2 3 const ( 4 createSpeechPath = "/v1/audio/speech" 5 ) 6 7 type TextToSpeechInput struct { 8 Text string `json:"text"` 9 Model string `json:"model"` 10 Voice string `json:"voice"` 11 ResponseFormat *string `json:"response_format,omitempty"` 12 Speed *float64 `json:"speed,omitempty"` 13 } 14 15 type TextToSpeechOutput struct { 16 Audio string `json:"audio"` 17 } 18 19 type TextToSpeechReq struct { 20 Input string `json:"input"` 21 Model string `json:"model"` 22 Voice string `json:"voice"` 23 ResponseFormat *string `json:"response_format,omitempty"` 24 Speed *float64 `json:"speed,omitempty"` 25 }