22
22
async_to_custom_streamed_response_wrapper ,
23
23
)
24
24
from ...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
28
27
29
28
__all__ = ["Speech" , "AsyncSpeech" ]
30
29
@@ -42,7 +41,7 @@ def create(
42
41
self ,
43
42
* ,
44
43
input : str ,
45
- model : Union [str , Literal [ "tts-1" , "tts-1-hd" ] ],
44
+ model : Union [str , SpeechModel ],
46
45
voice : Literal ["alloy" , "echo" , "fable" , "onyx" , "nova" , "shimmer" ],
47
46
response_format : Literal ["mp3" , "opus" , "aac" , "flac" , "wav" , "pcm" ] | NotGiven = NOT_GIVEN ,
48
47
speed : float | NotGiven = NOT_GIVEN ,
@@ -115,7 +114,7 @@ async def create(
115
114
self ,
116
115
* ,
117
116
input : str ,
118
- model : Union [str , Literal [ "tts-1" , "tts-1-hd" ] ],
117
+ model : Union [str , SpeechModel ],
119
118
voice : Literal ["alloy" , "echo" , "fable" , "onyx" , "nova" , "shimmer" ],
120
119
response_format : Literal ["mp3" , "opus" , "aac" , "flac" , "wav" , "pcm" ] | NotGiven = NOT_GIVEN ,
121
120
speed : float | NotGiven = NOT_GIVEN ,
0 commit comments