Skip to content

Commit

Permalink
do not needlessly export models
Browse files Browse the repository at this point in the history
  • Loading branch information
sgerhardt committed Jul 24, 2024
1 parent c3852c4 commit ce713ce
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ import (
"unicode/utf8"
)

type ElevenRequest struct {
type elevenRequest struct {
Text string `json:"text"`
ModelID string `json:"model_id"`
VoiceSettings VoiceSettings `json:"voice_settings"`
PronunciationDictionaryLocators []PronunciationDictionaryLocators `json:"pronunciation_dictionary_locators,omitempty"`
VoiceSettings voiceSettings `json:"voice_settings"`
PronunciationDictionaryLocators []pronunciationDictionaryLocators `json:"pronunciation_dictionary_locators,omitempty"`
Seed int `json:"seed,omitempty"`
PreviousText string `json:"previous_text,omitempty"`
NextText string `json:"next_text,omitempty"`
PreviousRequestIDs []string `json:"previous_request_ids,omitempty"`
NextRequestIDs []string `json:"next_request_ids,omitempty"`
}

type VoiceSettings struct {
type voiceSettings struct {
Stability float64 `json:"stability"`
SimilarityBoost float64 `json:"similarity_boost"`
Style int `json:"style,omitempty"`
UseSpeakerBoost bool `json:"use_speaker_boost,omitempty"`
}

type PronunciationDictionaryLocators struct {
type pronunciationDictionaryLocators struct {
PronunciationDictionaryID string `json:"pronunciation_dictionary_id,omitempty"`
VersionID string `json:"version_id,omitempty"`
}
Expand Down Expand Up @@ -128,10 +128,10 @@ func (c *ElevenLabs) FromText(text string, voiceID string) ([]byte, error) {
}

func buildPayload(text string) ([]byte, error) {
elvenReq := ElevenRequest{
elvenReq := elevenRequest{
Text: text,
ModelID: "eleven_monolingual_v1",
VoiceSettings: VoiceSettings{
VoiceSettings: voiceSettings{
Stability: 0,
SimilarityBoost: 0,
},
Expand Down

0 comments on commit ce713ce

Please sign in to comment.