-
Notifications
You must be signed in to change notification settings - Fork 14
/
option.go
53 lines (44 loc) · 1.57 KB
/
option.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
52
53
package ability
import "cloud.google.com/go/texttospeech/apiv1/texttospeechpb"
// LLMOption clients use TalkOption to guide LLMAblt in generating text
type LLMOption struct {
ChatGPT *ChatGPTOption `json:"chatGPT"`
}
type ChatGPTOption struct {
Model string `json:"model"`
MaxTokens int `json:"maxTokens"`
Temperature float32 `json:"temperature"`
TopP float32 `json:"topP"`
PresencePenalty float32 `json:"presencePenalty"`
FrequencyPenalty float32 `json:"frequencyPenalty"`
}
type STTOption struct {
Whisper *WhisperOption `json:"whisper"`
Google *GoogleSTTOption `json:"google"`
}
type GoogleTTSOption struct {
// if VoiceId is provided, LanguageCode and Gender will not be used
VoiceId string `json:"voiceId"`
LanguageCode string `json:"languageCode"`
Gender texttospeechpb.SsmlVoiceGender `json:"gender"`
SpeakingRate float64 `json:"speakingRate"`
Pitch float64 `json:"pitch"`
VolumeGainDb float64 `json:"volumeGainDb"`
}
type TTSOption struct {
Elevenlabs *ElevenlabsTTSOption `json:"elevenlabs"`
Google *GoogleTTSOption `json:"google"`
}
type WhisperOption struct {
Model string `json:"model"`
}
type GoogleSTTOption struct {
Recognizer string `json:"recognizer"`
Model string `json:"model"`
Language string `json:"language"`
}
type ElevenlabsTTSOption struct {
VoiceId string `json:"voiceId"`
Stability float32 `json:"stability"`
Clarity float32 `json:"clarity"`
}