|
2 | 2 |
|
3 | 3 | import typing |
4 | 4 | from ..core.client_wrapper import SyncClientWrapper |
5 | | -from .types.generate_speech_request_model_version import GenerateSpeechRequestModelVersion |
6 | 5 | from ..types.pronunciation_detail import PronunciationDetail |
7 | 6 | from ..core.request_options import RequestOptions |
8 | 7 | from ..types.generate_speech_response import GenerateSpeechResponse |
@@ -34,9 +33,8 @@ def generate( |
34 | 33 | audio_duration: typing.Optional[float] = OMIT, |
35 | 34 | channel_type: typing.Optional[str] = OMIT, |
36 | 35 | encode_as_base_64: typing.Optional[bool] = OMIT, |
37 | | - encoded_as_base_64_with_zero_retention: typing.Optional[bool] = OMIT, |
38 | 36 | format: typing.Optional[str] = OMIT, |
39 | | - model_version: typing.Optional[GenerateSpeechRequestModelVersion] = OMIT, |
| 37 | + model_version: typing.Optional[typing.Literal["GEN2"]] = OMIT, |
40 | 38 | multi_native_locale: typing.Optional[str] = OMIT, |
41 | 39 | pitch: typing.Optional[int] = OMIT, |
42 | 40 | pronunciation_dictionary: typing.Optional[typing.Dict[str, PronunciationDetail]] = OMIT, |
@@ -65,16 +63,13 @@ def generate( |
65 | 63 | Valid values: STEREO, MONO |
66 | 64 |
|
67 | 65 | encode_as_base_64 : typing.Optional[bool] |
68 | | - Set to true to receive audio in response as a Base64 encoded string instead of a url. |
69 | | -
|
70 | | - encoded_as_base_64_with_zero_retention : typing.Optional[bool] |
71 | | - Set to true to receive audio in response as a Base64 encoded string with zero data retention |
| 66 | + Set to true to receive audio in response as a Base64 encoded string instead of a url. This enables zero retention of audio data on Murf's servers. |
72 | 67 |
|
73 | 68 | format : typing.Optional[str] |
74 | 69 | Format of the generated audio file. Valid values: MP3, WAV, FLAC, ALAW, ULAW, PCM, OGG |
75 | 70 |
|
76 | | - model_version : typing.Optional[GenerateSpeechRequestModelVersion] |
77 | | - Valid values: GEN1, GEN2. Use GEN2 to generate audio using new and advanced model. Outputs from Gen 2 will sound better, but different from the old model |
| 71 | + model_version : typing.Optional[typing.Literal["GEN2"]] |
| 72 | + Valid values: GEN2. Audio will be generated using the new and advanced GEN2 model. Outputs from GEN2 sound more natural and high-quality compared to earlier models. |
78 | 73 |
|
79 | 74 | multi_native_locale : typing.Optional[str] |
80 | 75 | Specifies the language for the generated audio, enabling a voice to speak in multiple languages natively. Only available in the Gen2 model. |
@@ -133,7 +128,6 @@ def generate( |
133 | 128 | "audioDuration": audio_duration, |
134 | 129 | "channelType": channel_type, |
135 | 130 | "encodeAsBase64": encode_as_base_64, |
136 | | - "encodedAsBase64WithZeroRetention": encoded_as_base_64_with_zero_retention, |
137 | 131 | "format": format, |
138 | 132 | "modelVersion": model_version, |
139 | 133 | "multiNativeLocale": multi_native_locale, |
@@ -489,9 +483,8 @@ async def generate( |
489 | 483 | audio_duration: typing.Optional[float] = OMIT, |
490 | 484 | channel_type: typing.Optional[str] = OMIT, |
491 | 485 | encode_as_base_64: typing.Optional[bool] = OMIT, |
492 | | - encoded_as_base_64_with_zero_retention: typing.Optional[bool] = OMIT, |
493 | 486 | format: typing.Optional[str] = OMIT, |
494 | | - model_version: typing.Optional[GenerateSpeechRequestModelVersion] = OMIT, |
| 487 | + model_version: typing.Optional[typing.Literal["GEN2"]] = OMIT, |
495 | 488 | multi_native_locale: typing.Optional[str] = OMIT, |
496 | 489 | pitch: typing.Optional[int] = OMIT, |
497 | 490 | pronunciation_dictionary: typing.Optional[typing.Dict[str, PronunciationDetail]] = OMIT, |
@@ -520,16 +513,13 @@ async def generate( |
520 | 513 | Valid values: STEREO, MONO |
521 | 514 |
|
522 | 515 | encode_as_base_64 : typing.Optional[bool] |
523 | | - Set to true to receive audio in response as a Base64 encoded string instead of a url. |
524 | | -
|
525 | | - encoded_as_base_64_with_zero_retention : typing.Optional[bool] |
526 | | - Set to true to receive audio in response as a Base64 encoded string with zero data retention |
| 516 | + Set to true to receive audio in response as a Base64 encoded string instead of a url. This enables zero retention of audio data on Murf's servers. |
527 | 517 |
|
528 | 518 | format : typing.Optional[str] |
529 | 519 | Format of the generated audio file. Valid values: MP3, WAV, FLAC, ALAW, ULAW, PCM, OGG |
530 | 520 |
|
531 | | - model_version : typing.Optional[GenerateSpeechRequestModelVersion] |
532 | | - Valid values: GEN1, GEN2. Use GEN2 to generate audio using new and advanced model. Outputs from Gen 2 will sound better, but different from the old model |
| 521 | + model_version : typing.Optional[typing.Literal["GEN2"]] |
| 522 | + Valid values: GEN2. Audio will be generated using the new and advanced GEN2 model. Outputs from GEN2 sound more natural and high-quality compared to earlier models. |
533 | 523 |
|
534 | 524 | multi_native_locale : typing.Optional[str] |
535 | 525 | Specifies the language for the generated audio, enabling a voice to speak in multiple languages natively. Only available in the Gen2 model. |
@@ -596,7 +586,6 @@ async def main() -> None: |
596 | 586 | "audioDuration": audio_duration, |
597 | 587 | "channelType": channel_type, |
598 | 588 | "encodeAsBase64": encode_as_base_64, |
599 | | - "encodedAsBase64WithZeroRetention": encoded_as_base_64_with_zero_retention, |
600 | 589 | "format": format, |
601 | 590 | "modelVersion": model_version, |
602 | 591 | "multiNativeLocale": multi_native_locale, |
|
0 commit comments