@@ -75,11 +75,11 @@ class TTSConfig(BaseModel):
7575 top_p: Nucleus sampling parameter for token selection. Range: 0.0-1.0. Default: 0.7
7676 temperature: Randomness in generation. Range: 0.0-1.0. Default: 0.7.
7777 Higher = more varied, lower = more consistent
78- max_new_tokens: Maximum number of tokens to generate. Default: 1024
79- repetition_penalty: Penalty for repeated tokens. Default: 1.2
80- min_chunk_length: Minimum chunk length for generation. Default: 50
81- condition_on_previous_chunks: Whether to condition generation on previous chunks. Default: True
82- early_stop_threshold: Threshold for early stopping. Default: 1.0
78+ max_new_tokens: Maximum number of tokens to generate. Default: None (server decides)
79+ repetition_penalty: Penalty for repeated tokens. Default: None (server decides)
80+ min_chunk_length: Minimum chunk length for generation. Default: None (server decides)
81+ condition_on_previous_chunks: Whether to condition generation on previous chunks. Default: None (server decides)
82+ early_stop_threshold: Threshold for early stopping. Default: None (server decides)
8383 """
8484
8585 # Audio output settings
@@ -103,11 +103,11 @@ class TTSConfig(BaseModel):
103103 temperature : Annotated [float , Field (ge = 0.0 , le = 1.0 )] = 0.7
104104
105105 # Advanced generation parameters
106- max_new_tokens : int = 1024
107- repetition_penalty : float = 1.2
108- min_chunk_length : int = 50
109- condition_on_previous_chunks : bool = True
110- early_stop_threshold : float = 1.0
106+ max_new_tokens : Optional [ int ] = None
107+ repetition_penalty : Optional [ float ] = None
108+ min_chunk_length : Optional [ int ] = None
109+ condition_on_previous_chunks : Optional [ bool ] = None
110+ early_stop_threshold : Optional [ float ] = None
111111
112112
113113class TTSRequest (BaseModel ):
@@ -131,11 +131,11 @@ class TTSRequest(BaseModel):
131131 prosody: Speech speed and volume settings. Default: None
132132 top_p: Nucleus sampling for token selection. Range: 0.0-1.0. Default: 0.7
133133 temperature: Randomness in generation. Range: 0.0-1.0. Default: 0.7
134- max_new_tokens: Maximum number of tokens to generate. Default: 1024
135- repetition_penalty: Penalty for repeated tokens. Default: 1.2
136- min_chunk_length: Minimum chunk length for generation. Default: 50
137- condition_on_previous_chunks: Whether to condition generation on previous chunks. Default: True
138- early_stop_threshold: Threshold for early stopping. Default: 1.0
134+ max_new_tokens: Maximum number of tokens to generate. Default: None (server decides)
135+ repetition_penalty: Penalty for repeated tokens. Default: None (server decides)
136+ min_chunk_length: Minimum chunk length for generation. Default: None (server decides)
137+ condition_on_previous_chunks: Whether to condition generation on previous chunks. Default: None (server decides)
138+ early_stop_threshold: Threshold for early stopping. Default: None (server decides)
139139 """
140140
141141 text : str
@@ -151,11 +151,11 @@ class TTSRequest(BaseModel):
151151 prosody : Optional [Prosody ] = None
152152 top_p : Annotated [float , Field (ge = 0.0 , le = 1.0 )] = 0.7
153153 temperature : Annotated [float , Field (ge = 0.0 , le = 1.0 )] = 0.7
154- max_new_tokens : int = 1024
155- repetition_penalty : float = 1.2
156- min_chunk_length : int = 50
157- condition_on_previous_chunks : bool = True
158- early_stop_threshold : float = 1.0
154+ max_new_tokens : Optional [ int ] = None
155+ repetition_penalty : Optional [ float ] = None
156+ min_chunk_length : Optional [ int ] = None
157+ condition_on_previous_chunks : Optional [ bool ] = None
158+ early_stop_threshold : Optional [ float ] = None
159159
160160
161161# WebSocket event types for streaming TTS
0 commit comments