-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaudio.go
51 lines (42 loc) · 1.01 KB
/
audio.go
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
package coze
// AudioFormat represents the audio format type
type AudioFormat string
const (
AudioFormatWAV AudioFormat = "wav"
AudioFormatPCM AudioFormat = "pcm"
AudioFormatOGGOPUS AudioFormat = "ogg_opus"
AudioFormatM4A AudioFormat = "m4a"
AudioFormatAAC AudioFormat = "aac"
AudioFormatMP3 AudioFormat = "mp3"
)
func (f AudioFormat) String() string {
return string(f)
}
func (f AudioFormat) Ptr() *AudioFormat {
return &f
}
// LanguageCode represents the language code
type LanguageCode string
const (
LanguageCodeZH LanguageCode = "zh"
LanguageCodeEN LanguageCode = "en"
LanguageCodeJA LanguageCode = "ja"
LanguageCodeES LanguageCode = "es"
LanguageCodeID LanguageCode = "id"
LanguageCodePT LanguageCode = "pt"
)
func (l LanguageCode) String() string {
return string(l)
}
type audio struct {
Rooms *audioRooms
Speech *audioSpeech
Voices *audioVoices
}
func newAudio(core *core) *audio {
return &audio{
Rooms: newRooms(core),
Speech: newSpeech(core),
Voices: newVoice(core),
}
}