mirror of
https://github.com/taigrr/elevenlabs.git
synced 2026-04-02 03:08:57 -07:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
261398509a | ||
|
|
b925ef1471 |
@@ -83,7 +83,7 @@ func (c Client) TTS(ctx context.Context, text, voiceID, modelID string, options
|
||||
b := bytes.Buffer{}
|
||||
|
||||
defer res.Body.Close()
|
||||
io.Copy(w, res.Body)
|
||||
io.Copy(&b, res.Body)
|
||||
return b.Bytes(), nil
|
||||
case 422:
|
||||
fallthrough
|
||||
|
||||
@@ -19,7 +19,7 @@ type Voice struct {
|
||||
Labels string `json:"labels,omitempty"` // Serialized labels dictionary for the voice.
|
||||
}
|
||||
type TTS struct {
|
||||
ModelID string `json:"model_id"`
|
||||
ModelID string `json:"model_id,omitempty"`
|
||||
Text string `json:"text"` // The text that will get converted into speech. Currently only English text is supported.
|
||||
VoiceSettings SynthesisOptions `json:"voice_settings,omitempty"` // Voice settings are applied only on the given TTS request.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user