2222 async_to_custom_streamed_response_wrapper ,
2323)
2424from ...types .audio import speech_create_params
25- from ..._base_client import (
26- make_request_options ,
27- )
25+ from ..._base_client import make_request_options
26+ from ...types .audio .speech_model import SpeechModel
2827
2928__all__ = ["Speech" , "AsyncSpeech" ]
3029
@@ -42,7 +41,7 @@ def create(
4241 self ,
4342 * ,
4443 input : str ,
45- model : Union [str , Literal [ "tts-1" , "tts-1-hd" ] ],
44+ model : Union [str , SpeechModel ],
4645 voice : Literal ["alloy" , "echo" , "fable" , "onyx" , "nova" , "shimmer" ],
4746 response_format : Literal ["mp3" , "opus" , "aac" , "flac" , "wav" , "pcm" ] | NotGiven = NOT_GIVEN ,
4847 speed : float | NotGiven = NOT_GIVEN ,
@@ -115,7 +114,7 @@ async def create(
115114 self ,
116115 * ,
117116 input : str ,
118- model : Union [str , Literal [ "tts-1" , "tts-1-hd" ] ],
117+ model : Union [str , SpeechModel ],
119118 voice : Literal ["alloy" , "echo" , "fable" , "onyx" , "nova" , "shimmer" ],
120119 response_format : Literal ["mp3" , "opus" , "aac" , "flac" , "wav" , "pcm" ] | NotGiven = NOT_GIVEN ,
121120 speed : float | NotGiven = NOT_GIVEN ,
0 commit comments