Skip to main content

Module models

Module models 

Source
Expand description

Data models for the Typecast API

This module contains all the data structures used for API requests and responses.

Structs§

Credits
Credit usage information
CustomVoice
A custom (user-cloned) voice returned by the clone-voice endpoint
ErrorResponse
API error response
GenerateToFileRequest
Convenience request for generating audio directly to a file.
Limits
Usage limit information
ModelInfo
Model information with supported emotions
Output
Audio output settings
OutputStream
Audio output settings for streaming TTS requests.
PresetPrompt
Preset-based emotion control for ssfm-v30 model
Prompt
Emotion settings for ssfm-v21 model
RecommendedVoice
Voice recommendation result.
SmartPrompt
Context-aware emotion inference for ssfm-v30 model
SubscriptionResponse
Response from GET /v1/users/me/subscription
TTSRequest
Text-to-Speech request parameters
TTSRequestStream
Streaming Text-to-Speech request parameters.
TTSResponse
Text-to-Speech response
VoiceV2
Voice from V2 API with enhanced metadata
VoicesV2Filter
Filter options for V2 voices endpoint

Enums§

Age
Age group classification for voices
AudioFormat
Audio output format
EmotionPreset
Emotion preset types for speech synthesis
Gender
Gender classification for voices
PlanTier
Subscription plan tier
TTSModel
TTS model version to use for speech synthesis
TTSPrompt
Union type for all prompt types
UseCase
Voice use case categories

Constants§

CLONING_MAX_FILE_SIZE
Maximum audio file size for voice cloning (25 MB)
NAME_MAX_LENGTH
Maximum character length for a custom voice name
NAME_MIN_LENGTH
Minimum character length for a custom voice name