mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-15 12:43:41 +08:00
✨ add transcriptions api
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package types
|
||||
|
||||
import "mime/multipart"
|
||||
|
||||
type SpeechAudioRequest struct {
|
||||
Model string `json:"model"`
|
||||
Input string `json:"input"`
|
||||
@@ -7,3 +9,20 @@ type SpeechAudioRequest struct {
|
||||
ResponseFormat string `json:"response_format,omitempty"`
|
||||
Speed float64 `json:"speed,omitempty"`
|
||||
}
|
||||
|
||||
type AudioRequest struct {
|
||||
File *multipart.FileHeader `form:"file"`
|
||||
Model string `form:"model"`
|
||||
Language string `form:"language"`
|
||||
Prompt string `form:"prompt"`
|
||||
ResponseFormat string `form:"response_format"`
|
||||
Temperature float32 `form:"temperature"`
|
||||
}
|
||||
|
||||
type AudioResponse struct {
|
||||
Task string `json:"task,omitempty"`
|
||||
Language string `json:"language,omitempty"`
|
||||
Duration float64 `json:"duration,omitempty"`
|
||||
Segments any `json:"segments,omitempty"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user