Documentation
¶
Index ¶
- func HandleSpeech(c echo.Context, options mo.Option[types.SpeechRequestOptions]) mo.Result[any]
- func HandleVoices(c echo.Context, _ mo.Option[types.VoicesRequestOptions]) mo.Result[any]
- func ListVoices(_ context.Context) ([]types.Voice, error)
- type SpeechRequestOptions
- type SpeechRequestOptionsApp
- type SpeechRequestOptionsAudio
- type SpeechRequestOptionsRequest
- type SpeechRequestOptionsUser
- type VoicesResponse
- type VoicesResponseData
- type VoicesResponseDataResourcePack
- type VoicesResponseDataResourcePackDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleSpeech ¶
func HandleVoices ¶
Types ¶
type SpeechRequestOptions ¶
type SpeechRequestOptions struct {
App SpeechRequestOptionsApp `json:"app"`
User SpeechRequestOptionsUser `json:"user"`
Audio SpeechRequestOptionsAudio `json:"audio"`
Request SpeechRequestOptionsRequest `json:"request"`
}
type SpeechRequestOptionsApp ¶
type SpeechRequestOptionsAudio ¶
type SpeechRequestOptionsAudio struct {
VoiceType string `json:"voice_type"`
Emotion *string `json:"emotion,omitempty"`
EnableEmotion *bool `json:"enable_emotion,omitempty"`
EmotionScale *float64 `json:"emotion_scale,omitempty"`
Encoding *string `json:"encoding,omitempty"`
SpeedRatio *float64 `json:"speed_ratio,omitempty"`
Rate *int `json:"rate,omitempty"`
BitRate *int `json:"bit_rate,omitempty"`
ExplicitLanguage *string `json:"explicit_language,omitempty"`
ContextLanguage *string `json:"context_language,omitempty"`
LoudnessRatio *float64 `json:"loudness_ratio,omitempty"`
}
type SpeechRequestOptionsRequest ¶
type SpeechRequestOptionsRequest struct {
RequestID string `json:"reqid"`
Text string `json:"text"`
TextType *string `json:"text_type,omitempty"`
SilenceDuration *float64 `json:"silence_duration,omitempty"`
WithTimestamp *string `json:"with_timestamp,omitempty"`
Operation *string `json:"operation,omitempty"`
ExtraParam *string `json:"extra_param,omitempty"`
DisableMarkdownFilter *bool `json:"disable_markdown_filter,omitempty"`
EnableLatexTone *bool `json:"enable_latex_tn,omitempty"`
CacheConfig map[string]any `json:"cache_config,omitempty"`
UseCache *bool `json:"use_cache,omitempty"`
}
type SpeechRequestOptionsUser ¶
type SpeechRequestOptionsUser struct {
UserID string `json:"uid"`
}
type VoicesResponse ¶
type VoicesResponse struct {
Status string `json:"status"`
Error any `json:"error,omitempty"`
Data VoicesResponseData `json:"data"`
}
type VoicesResponseData ¶
type VoicesResponseData struct {
ResourcePacks []VoicesResponseDataResourcePack `json:"resource_packs"`
}
type VoicesResponseDataResourcePack ¶
type VoicesResponseDataResourcePack struct {
InstanceNumber string `json:"instance_number"`
ResourceID string `json:"resource_id"`
Code string `json:"code"`
ConfigurationCode string `json:"configuration_code"`
ResourceDisplay string `json:"resource_display"`
RawType string `json:"raw_type"`
Type string `json:"type"`
PurchasedAmount string `json:"purchased_amount"`
CurrentUsage string `json:"current_usage"`
Expires string `json:"expires"`
Details VoicesResponseDataResourcePackDetails `json:"details"`
GroupName string `json:"group_name"`
Alias string `json:"alias"`
TrainID string `json:"train_id"`
State string `json:"state"`
}
Click to show internal directories.
Click to hide internal directories.