|
14 | 14 | PronunciationDictionaryVersionLocator, Model |
15 | 15 | from .environment import ElevenLabsEnvironment |
16 | 16 | from .realtime_tts import RealtimeTextToSpeechClient |
| 17 | +from .types import OutputFormat |
17 | 18 |
|
18 | 19 |
|
19 | 20 | DEFAULT_VOICE = Voice( |
@@ -124,7 +125,7 @@ def generate( |
124 | 125 | model: Union[ModelId, Model] = "eleven_monolingual_v1", |
125 | 126 | optimize_streaming_latency: typing.Optional[int] = 0, |
126 | 127 | stream: bool = False, |
127 | | - output_format: Optional[str] = "mp3_44100_128", |
| 128 | + output_format: Optional[OutputFormat] = "mp3_44100_128", |
128 | 129 | pronunciation_dictionary_locators: typing.Optional[ |
129 | 130 | typing.Sequence[PronunciationDictionaryVersionLocator] |
130 | 131 | ] = OMIT, |
@@ -152,7 +153,7 @@ def generate( |
152 | 153 |
|
153 | 154 | Defaults to False. |
154 | 155 |
|
155 | | - - output_format: typing.Optional[str]. Output format of the generated audio. Must be one of: |
| 156 | + - output_format: typing.Optional[OutputFormat]. Output format of the generated audio. Must be one of: |
156 | 157 | mp3_22050_32 - output format, mp3 with 22.05kHz sample rate at 32kbps. |
157 | 158 | mp3_44100_32 - output format, mp3 with 44.1kHz sample rate at 32kbps. |
158 | 159 | mp3_44100_64 - output format, mp3 with 44.1kHz sample rate at 64kbps. |
@@ -303,7 +304,7 @@ async def generate( |
303 | 304 | model: Union[ModelId, Model] = "eleven_monolingual_v1", |
304 | 305 | optimize_streaming_latency: typing.Optional[int] = 0, |
305 | 306 | stream: bool = False, |
306 | | - output_format: Optional[str] = "mp3_44100_128", |
| 307 | + output_format: Optional[OutputFormat] = "mp3_44100_128", |
307 | 308 | pronunciation_dictionary_locators: typing.Optional[ |
308 | 309 | typing.Sequence[PronunciationDictionaryVersionLocator] |
309 | 310 | ] = OMIT, |
@@ -338,7 +339,7 @@ async def generate( |
338 | 339 |
|
339 | 340 | Defaults to False. |
340 | 341 |
|
341 | | - - output_format: typing.Optional[str]. Output format of the generated audio. Must be one of: |
| 342 | + - output_format: typing.Optional[OutputFormat]. Output format of the generated audio. Must be one of: |
342 | 343 | mp3_22050_32 - output format, mp3 with 22.05kHz sample rate at 32kbps. |
343 | 344 | mp3_44100_32 - output format, mp3 with 44.1kHz sample rate at 32kbps. |
344 | 345 | mp3_44100_64 - output format, mp3 with 44.1kHz sample rate at 64kbps. |
|
0 commit comments