@@ -324,8 +324,10 @@ def to_config(self) -> Dict[str, Any]:
324324
325325class MiniMaxTTSOptions (BaseModel ):
326326 key : str = Field (..., description = "MiniMax API key" )
327- voice_id : Optional [str ] = Field (default = None , description = "Voice ID" )
328- model : Optional [str ] = Field (default = None , description = "Model name" )
327+ group_id : str = Field (..., description = "MiniMax group identifier" )
328+ model : str = Field (..., description = "TTS model (e.g., 'speech-02-turbo')" )
329+ voice_id : str = Field (..., description = "Voice style identifier (e.g., 'English_captivating_female1')" )
330+ url : str = Field (..., description = "WebSocket endpoint (e.g., 'wss://api-uw.minimax.io/ws/v1/t2a_v2')" )
329331 skip_patterns : Optional [List [int ]] = Field (default = None )
330332
331333 class Config :
@@ -341,12 +343,13 @@ def sample_rate(self) -> Optional[int]:
341343 return None
342344
343345 def to_config (self ) -> Dict [str , Any ]:
344- params : Dict [str , Any ] = {"key" : self .options .key }
345-
346- if self .options .voice_id is not None :
347- params ["voice_id" ] = self .options .voice_id
348- if self .options .model is not None :
349- params ["model" ] = self .options .model
346+ params : Dict [str , Any ] = {
347+ "key" : self .options .key ,
348+ "group_id" : self .options .group_id ,
349+ "model" : self .options .model ,
350+ "voice_setting" : {"voice_id" : self .options .voice_id },
351+ "url" : self .options .url ,
352+ }
350353
351354 result : Dict [str , Any ] = {"vendor" : "minimax" , "params" : params }
352355 if self .options .skip_patterns is not None :
0 commit comments