-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtranscription.go
More file actions
78 lines (66 loc) · 2.41 KB
/
transcription.go
File metadata and controls
78 lines (66 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// This file was auto-generated by Fern from our API Definition.
package cambai
import (
json "encoding/json"
fmt "fmt"
core "github.com/camb-ai/cambai-go-sdk/core"
)
type BodyCreateTranscriptionTranscribePost struct {
RunID *int `json:"-" url:"run_id,omitempty"`
// Signed URL to audio file for transcription
Language Languages `json:"language" url:"language"`
// Signed URL to media file for transcription
MediaURL *string `json:"media_url,omitempty" url:"media_url,omitempty"`
// [DEPRECATED] Use 'audio_url' instead
AudioURL *string `json:"audio_url,omitempty" url:"audio_url,omitempty"`
ProjectName *string `json:"project_name,omitempty" url:"project_name,omitempty"`
ProjectDescription *string `json:"project_description,omitempty" url:"project_description,omitempty"`
FolderID *int `json:"folder_id,omitempty" url:"folder_id,omitempty"`
}
type GetTranscriptionResultTranscriptionResultRunIDGetRequest struct {
WordLevelTimestamps *bool `json:"-" url:"word_level_timestamps,omitempty"`
}
type GetTranscriptionResultsTranscriptionResultsPostRequest struct {
Traceparent *string `json:"-" url:"-"`
RunID *int `json:"-" url:"run_id,omitempty"`
Body *RunIDsRequestPayload `json:"-" url:"-"`
}
func (g *GetTranscriptionResultsTranscriptionResultsPostRequest) UnmarshalJSON(data []byte) error {
body := new(RunIDsRequestPayload)
if err := json.Unmarshal(data, &body); err != nil {
return err
}
g.Body = body
return nil
}
func (g *GetTranscriptionResultsTranscriptionResultsPostRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(g.Body)
}
type GetTranscriptionTaskStatusTranscribeTaskIDGetRequest struct {
RunID *int `json:"-" url:"run_id,omitempty"`
}
type TranscriptionResult struct {
Transcript []*Transcript `json:"transcript,omitempty" url:"transcript,omitempty"`
_rawJSON json.RawMessage
}
func (t *TranscriptionResult) UnmarshalJSON(data []byte) error {
type unmarshaler TranscriptionResult
var value unmarshaler
if err := json.Unmarshal(data, &value); err != nil {
return err
}
*t = TranscriptionResult(value)
t._rawJSON = json.RawMessage(data)
return nil
}
func (t *TranscriptionResult) String() string {
if len(t._rawJSON) > 0 {
if value, err := core.StringifyJSON(t._rawJSON); err == nil {
return value
}
}
if value, err := core.StringifyJSON(t); err == nil {
return value
}
return fmt.Sprintf("%#v", t)
}