starting into voice work

This commit is contained in:
2023-04-18 16:57:18 -07:00
parent b476a5aaf9
commit 0dd940e5f1
2 changed files with 212 additions and 25 deletions

View File

@@ -9,8 +9,6 @@ type AddVoiceResponse struct {
VoiceID string `json:"voice_id"`
}
type AnyOfValidationErrorLocItems struct{}
type HistoryPost struct {
HistoryItemIds []string `json:"history_item_ids"`
}
@@ -25,11 +23,6 @@ type TTS struct {
VoiceSettings SynthesisOptions `json:"voice_settings,omitempty"` // Voice settings are applied only on the given TTS request.
}
var DefaultSynthesisOptions = SynthesisOptions{
Stability: 75,
SimilarityBoost: 75,
}
type SynthesisOptions struct {
Stability float64 `json:"stability"`
SimilarityBoost float64 `json:"similarity_boost"`
@@ -51,7 +44,7 @@ type ExtendedSubscriptionResponseModel struct {
CanUseDelayedPaymentMethods bool `json:"can_use_delayed_payment_methods"`
Currency string `json:"currency"`
Status string `json:"status"`
NextInvoice InvoiceResponseModel `json:"next_invoice"`
NextInvoice Invoice `json:"next_invoice"`
}
type FeedbackResponseModel struct {
ThumbsUp bool `json:"thumbs_up"`
@@ -93,9 +86,6 @@ type HistoryItemList struct {
Settings *interface{} `json:"settings"`
Feedback *FeedbackResponseModel `json:"feedback"`
}
type HttpValidationError struct {
Detail []ValidationError `json:"detail,omitempty"`
}
type Invoice struct {
AmountDueCents int32 `json:"amount_due_cents"`
NextPaymentAttemptUnix int32 `json:"next_payment_attempt_unix"`
@@ -147,9 +137,9 @@ type UserResponseModel struct {
XiAPIKey string `json:"xi_api_key"`
}
type ValidationError struct {
Loc []AnyOfValidationErrorLocItems `json:"loc"`
Msg string `json:"msg"`
Type_ string `json:"type"`
Loc any `json:"loc"`
Msg string `json:"msg"`
Type_ string `json:"type"`
}
func (ve ValidationError) Error() string {