Skip to content

Commit 5ce8510

Browse files
committed
Release 2.1.0
1 parent ff81a6a commit 5ce8510

File tree

10 files changed

+19
-53
lines changed

10 files changed

+19
-53
lines changed

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "murf"
33

44
[tool.poetry]
55
name = "murf"
6-
version = "2.0.2"
6+
version = "2.1.0"
77
description = ""
88
readme = "README.md"
99
authors = []

reference.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,7 @@ client.text_to_speech.generate(
146146
<dl>
147147
<dd>
148148

149-
**encode_as_base_64:** `typing.Optional[bool]` — Set to true to receive audio in response as a Base64 encoded string instead of a url.
150-
151-
</dd>
152-
</dl>
153-
154-
<dl>
155-
<dd>
156-
157-
**encoded_as_base_64_with_zero_retention:** `typing.Optional[bool]` — Set to true to receive audio in response as a Base64 encoded string with zero data retention
149+
**encode_as_base_64:** `typing.Optional[bool]` — 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.
158150

159151
</dd>
160152
</dl>
@@ -170,7 +162,7 @@ client.text_to_speech.generate(
170162
<dl>
171163
<dd>
172164

173-
**model_version:** `typing.Optional[GenerateSpeechRequestModelVersion]` — 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
165+
**model_version:** `typing.Optional[typing.Literal["GEN2"]]` — 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.
174166

175167
</dd>
176168
</dl>

src/murf/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
from .dubbing_client import MurfDub
5757
from .environment import MurfEnvironment
5858
from .stream_input import ReceiveMessage, SendMessage
59-
from .text_to_speech import GenerateSpeechRequestModelVersion
6059
from .version import __version__
6160

6261
__all__ = [
@@ -78,7 +77,6 @@
7877
"FinalOutput",
7978
"ForbiddenError",
8079
"FormDataContentDisposition",
81-
"GenerateSpeechRequestModelVersion",
8280
"GenerateSpeechResponse",
8381
"GroupApiProjectResponse",
8482
"InternalServerError",

src/murf/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def get_headers(self) -> typing.Dict[str, str]:
2323
headers: typing.Dict[str, str] = {
2424
"X-Fern-Language": "Python",
2525
"X-Fern-SDK-Name": "murf",
26-
"X-Fern-SDK-Version": "2.0.2",
26+
"X-Fern-SDK-Version": "2.1.0",
2727
}
2828
if self._api_key is not None:
2929
headers["api-key"] = self._api_key
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
# This file was auto-generated by Fern from our API Definition.
22

3-
from .types import GenerateSpeechRequestModelVersion
4-
5-
__all__ = ["GenerateSpeechRequestModelVersion"]

src/murf/text_to_speech/client.py

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import typing
44
from ..core.client_wrapper import SyncClientWrapper
5-
from .types.generate_speech_request_model_version import GenerateSpeechRequestModelVersion
65
from ..types.pronunciation_detail import PronunciationDetail
76
from ..core.request_options import RequestOptions
87
from ..types.generate_speech_response import GenerateSpeechResponse
@@ -34,9 +33,8 @@ def generate(
3433
audio_duration: typing.Optional[float] = OMIT,
3534
channel_type: typing.Optional[str] = OMIT,
3635
encode_as_base_64: typing.Optional[bool] = OMIT,
37-
encoded_as_base_64_with_zero_retention: typing.Optional[bool] = OMIT,
3836
format: typing.Optional[str] = OMIT,
39-
model_version: typing.Optional[GenerateSpeechRequestModelVersion] = OMIT,
37+
model_version: typing.Optional[typing.Literal["GEN2"]] = OMIT,
4038
multi_native_locale: typing.Optional[str] = OMIT,
4139
pitch: typing.Optional[int] = OMIT,
4240
pronunciation_dictionary: typing.Optional[typing.Dict[str, PronunciationDetail]] = OMIT,
@@ -65,16 +63,13 @@ def generate(
6563
Valid values: STEREO, MONO
6664
6765
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.
7267
7368
format : typing.Optional[str]
7469
Format of the generated audio file. Valid values: MP3, WAV, FLAC, ALAW, ULAW, PCM, OGG
7570
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.
7873
7974
multi_native_locale : typing.Optional[str]
8075
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(
133128
"audioDuration": audio_duration,
134129
"channelType": channel_type,
135130
"encodeAsBase64": encode_as_base_64,
136-
"encodedAsBase64WithZeroRetention": encoded_as_base_64_with_zero_retention,
137131
"format": format,
138132
"modelVersion": model_version,
139133
"multiNativeLocale": multi_native_locale,
@@ -489,9 +483,8 @@ async def generate(
489483
audio_duration: typing.Optional[float] = OMIT,
490484
channel_type: typing.Optional[str] = OMIT,
491485
encode_as_base_64: typing.Optional[bool] = OMIT,
492-
encoded_as_base_64_with_zero_retention: typing.Optional[bool] = OMIT,
493486
format: typing.Optional[str] = OMIT,
494-
model_version: typing.Optional[GenerateSpeechRequestModelVersion] = OMIT,
487+
model_version: typing.Optional[typing.Literal["GEN2"]] = OMIT,
495488
multi_native_locale: typing.Optional[str] = OMIT,
496489
pitch: typing.Optional[int] = OMIT,
497490
pronunciation_dictionary: typing.Optional[typing.Dict[str, PronunciationDetail]] = OMIT,
@@ -520,16 +513,13 @@ async def generate(
520513
Valid values: STEREO, MONO
521514
522515
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.
527517
528518
format : typing.Optional[str]
529519
Format of the generated audio file. Valid values: MP3, WAV, FLAC, ALAW, ULAW, PCM, OGG
530520
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.
533523
534524
multi_native_locale : typing.Optional[str]
535525
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:
596586
"audioDuration": audio_duration,
597587
"channelType": channel_type,
598588
"encodeAsBase64": encode_as_base_64,
599-
"encodedAsBase64WithZeroRetention": encoded_as_base_64_with_zero_retention,
600589
"format": format,
601590
"modelVersion": model_version,
602591
"multiNativeLocale": multi_native_locale,

src/murf/text_to_speech/types/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/murf/text_to_speech/types/generate_speech_request_model_version.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/murf/types/generate_speech_response.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
from ..core.unchecked_base_model import UncheckedBaseModel
44
import typing_extensions
55
from ..core.serialization import FieldMetadata
6-
import pydantic
76
import typing
7+
import pydantic
88
from .word_duration_response import WordDurationResponse
99
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1010

1111

1212
class GenerateSpeechResponse(UncheckedBaseModel):
1313
audio_file: typing_extensions.Annotated[str, FieldMetadata(alias="audioFile")]
1414
audio_length_in_seconds: typing_extensions.Annotated[float, FieldMetadata(alias="audioLengthInSeconds")]
15-
consumed_character_count: typing_extensions.Annotated[int, FieldMetadata(alias="consumedCharacterCount")] = (
16-
pydantic.Field()
17-
)
15+
consumed_character_count: typing_extensions.Annotated[
16+
typing.Optional[int], FieldMetadata(alias="consumedCharacterCount")
17+
] = pydantic.Field(default=None)
1818
"""
1919
Number of characters consumed so far in the current billing cycle.
2020
"""

0 commit comments

Comments
 (0)