murf 1.2.3__py3-none-any.whl → 2.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of murf might be problematic. Click here for more details.

Files changed (62) hide show
  1. murf/__init__.py +37 -1
  2. murf/auth/client.py +11 -9
  3. murf/base_client.py +3 -20
  4. murf/client.py +0 -8
  5. murf/core/__init__.py +4 -0
  6. murf/core/client_wrapper.py +18 -17
  7. murf/core/http_client.py +6 -6
  8. murf/core/pydantic_utilities.py +2 -2
  9. murf/core/unchecked_base_model.py +305 -0
  10. murf/dubbing/jobs/client.py +37 -31
  11. murf/dubbing/languages/client.py +25 -21
  12. murf/dubbing/projects/client.py +37 -31
  13. murf/dubbing_client.py +0 -8
  14. murf/environment.py +10 -3
  15. murf/stream_input/__init__.py +5 -0
  16. murf/stream_input/types/__init__.py +6 -0
  17. murf/stream_input/types/receive_message.py +7 -0
  18. murf/stream_input/types/send_message.py +9 -0
  19. murf/text/client.py +15 -13
  20. murf/text_to_speech/client.py +79 -37
  21. murf/types/__init__.py +44 -0
  22. murf/types/api_job_response.py +2 -2
  23. murf/types/api_project_response.py +2 -2
  24. murf/types/api_voice.py +2 -2
  25. murf/types/audio_output.py +27 -0
  26. murf/types/auth_token_response.py +2 -2
  27. murf/types/character_count.py +2 -2
  28. murf/types/clear_context.py +20 -0
  29. murf/types/dub_api_detail_response.py +2 -2
  30. murf/types/dub_job_status_response.py +2 -2
  31. murf/types/final_output.py +27 -0
  32. murf/types/form_data_content_disposition.py +2 -2
  33. murf/types/generate_speech_response.py +2 -2
  34. murf/types/group_api_project_response.py +2 -2
  35. murf/types/locale_response.py +2 -2
  36. murf/types/metadata.py +2 -2
  37. murf/types/murf_api_translation_response.py +2 -2
  38. murf/types/pronunciation_detail.py +2 -2
  39. murf/types/send_text.py +35 -0
  40. murf/types/send_text_voice_config.py +55 -0
  41. murf/types/send_text_voice_config_pronunciation_dictionary_value.py +30 -0
  42. murf/types/send_text_voice_config_pronunciation_dictionary_value_type.py +5 -0
  43. murf/types/set_advanced_settings.py +20 -0
  44. murf/types/set_voice_configuration_or_initialize_context.py +26 -0
  45. murf/types/set_voice_configuration_or_initialize_context_voice_config.py +57 -0
  46. murf/types/set_voice_configuration_or_initialize_context_voice_config_pronunciation_dictionary_value.py +30 -0
  47. murf/types/set_voice_configuration_or_initialize_context_voice_config_pronunciation_dictionary_value_type.py +7 -0
  48. murf/types/source_locale_response.py +2 -2
  49. murf/types/speech_to_speech_response.py +2 -2
  50. murf/types/style_details.py +2 -2
  51. murf/types/translation.py +2 -2
  52. murf/types/tts_request_both_payload.py +29 -0
  53. murf/types/tts_request_both_payload_voice_config.py +44 -0
  54. murf/types/tts_request_both_payload_voice_config_pronunciation_dictionary.py +22 -0
  55. murf/types/tts_request_both_payload_voice_config_pronunciation_dictionary_guess.py +20 -0
  56. murf/types/word_duration_response.py +2 -2
  57. murf/voice_changer/client.py +29 -23
  58. {murf-1.2.3.dist-info → murf-2.0.1.dist-info}/METADATA +1 -1
  59. murf-2.0.1.dist-info/RECORD +101 -0
  60. murf-1.2.3.dist-info/RECORD +0 -80
  61. {murf-1.2.3.dist-info → murf-2.0.1.dist-info}/LICENSE +0 -0
  62. {murf-1.2.3.dist-info → murf-2.0.1.dist-info}/WHEEL +0 -0
murf/types/__init__.py CHANGED
@@ -7,10 +7,13 @@ from .api_project_response import ApiProjectResponse
7
7
  from .api_project_response_dubbing_type import ApiProjectResponseDubbingType
8
8
  from .api_voice import ApiVoice
9
9
  from .api_voice_gender import ApiVoiceGender
10
+ from .audio_output import AudioOutput
10
11
  from .auth_token_response import AuthTokenResponse
11
12
  from .character_count import CharacterCount
13
+ from .clear_context import ClearContext
12
14
  from .dub_api_detail_response import DubApiDetailResponse
13
15
  from .dub_job_status_response import DubJobStatusResponse
16
+ from .final_output import FinalOutput
14
17
  from .form_data_content_disposition import FormDataContentDisposition
15
18
  from .generate_speech_response import GenerateSpeechResponse
16
19
  from .group_api_project_response import GroupApiProjectResponse
@@ -20,10 +23,35 @@ from .metadata import Metadata
20
23
  from .murf_api_translation_response import MurfApiTranslationResponse
21
24
  from .pronunciation_detail import PronunciationDetail
22
25
  from .pronunciation_detail_type import PronunciationDetailType
26
+ from .send_text import SendText
27
+ from .send_text_voice_config import SendTextVoiceConfig
28
+ from .send_text_voice_config_pronunciation_dictionary_value import SendTextVoiceConfigPronunciationDictionaryValue
29
+ from .send_text_voice_config_pronunciation_dictionary_value_type import (
30
+ SendTextVoiceConfigPronunciationDictionaryValueType,
31
+ )
32
+ from .set_advanced_settings import SetAdvancedSettings
33
+ from .set_voice_configuration_or_initialize_context import SetVoiceConfigurationOrInitializeContext
34
+ from .set_voice_configuration_or_initialize_context_voice_config import (
35
+ SetVoiceConfigurationOrInitializeContextVoiceConfig,
36
+ )
37
+ from .set_voice_configuration_or_initialize_context_voice_config_pronunciation_dictionary_value import (
38
+ SetVoiceConfigurationOrInitializeContextVoiceConfigPronunciationDictionaryValue,
39
+ )
40
+ from .set_voice_configuration_or_initialize_context_voice_config_pronunciation_dictionary_value_type import (
41
+ SetVoiceConfigurationOrInitializeContextVoiceConfigPronunciationDictionaryValueType,
42
+ )
23
43
  from .source_locale_response import SourceLocaleResponse
24
44
  from .speech_to_speech_response import SpeechToSpeechResponse
25
45
  from .style_details import StyleDetails
26
46
  from .translation import Translation
47
+ from .tts_request_both_payload import TtsRequestBothPayload
48
+ from .tts_request_both_payload_voice_config import TtsRequestBothPayloadVoiceConfig
49
+ from .tts_request_both_payload_voice_config_pronunciation_dictionary import (
50
+ TtsRequestBothPayloadVoiceConfigPronunciationDictionary,
51
+ )
52
+ from .tts_request_both_payload_voice_config_pronunciation_dictionary_guess import (
53
+ TtsRequestBothPayloadVoiceConfigPronunciationDictionaryGuess,
54
+ )
27
55
  from .word_duration_response import WordDurationResponse
28
56
 
29
57
  __all__ = [
@@ -34,10 +62,13 @@ __all__ = [
34
62
  "ApiProjectResponseDubbingType",
35
63
  "ApiVoice",
36
64
  "ApiVoiceGender",
65
+ "AudioOutput",
37
66
  "AuthTokenResponse",
38
67
  "CharacterCount",
68
+ "ClearContext",
39
69
  "DubApiDetailResponse",
40
70
  "DubJobStatusResponse",
71
+ "FinalOutput",
41
72
  "FormDataContentDisposition",
42
73
  "GenerateSpeechResponse",
43
74
  "GroupApiProjectResponse",
@@ -47,9 +78,22 @@ __all__ = [
47
78
  "MurfApiTranslationResponse",
48
79
  "PronunciationDetail",
49
80
  "PronunciationDetailType",
81
+ "SendText",
82
+ "SendTextVoiceConfig",
83
+ "SendTextVoiceConfigPronunciationDictionaryValue",
84
+ "SendTextVoiceConfigPronunciationDictionaryValueType",
85
+ "SetAdvancedSettings",
86
+ "SetVoiceConfigurationOrInitializeContext",
87
+ "SetVoiceConfigurationOrInitializeContextVoiceConfig",
88
+ "SetVoiceConfigurationOrInitializeContextVoiceConfigPronunciationDictionaryValue",
89
+ "SetVoiceConfigurationOrInitializeContextVoiceConfigPronunciationDictionaryValueType",
50
90
  "SourceLocaleResponse",
51
91
  "SpeechToSpeechResponse",
52
92
  "StyleDetails",
53
93
  "Translation",
94
+ "TtsRequestBothPayload",
95
+ "TtsRequestBothPayloadVoiceConfig",
96
+ "TtsRequestBothPayloadVoiceConfigPronunciationDictionary",
97
+ "TtsRequestBothPayloadVoiceConfigPronunciationDictionaryGuess",
54
98
  "WordDurationResponse",
55
99
  ]
@@ -1,6 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  from .api_job_response_dubbing_type import ApiJobResponseDubbingType
6
6
  import pydantic
@@ -8,7 +8,7 @@ from .api_job_response_priority import ApiJobResponsePriority
8
8
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
9
 
10
10
 
11
- class ApiJobResponse(UniversalBaseModel):
11
+ class ApiJobResponse(UncheckedBaseModel):
12
12
  file_url: typing.Optional[str] = None
13
13
  dubbing_type: ApiJobResponseDubbingType = pydantic.Field()
14
14
  """
@@ -1,13 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import pydantic
5
5
  import typing
6
6
  from .api_project_response_dubbing_type import ApiProjectResponseDubbingType
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
 
9
9
 
10
- class ApiProjectResponse(UniversalBaseModel):
10
+ class ApiProjectResponse(UncheckedBaseModel):
11
11
  project_id: str = pydantic.Field()
12
12
  """
13
13
  Your Project Id
murf/types/api_voice.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  import pydantic
6
6
  import typing_extensions
@@ -10,7 +10,7 @@ from .style_details import StyleDetails
10
10
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
11
11
 
12
12
 
13
- class ApiVoice(UniversalBaseModel):
13
+ class ApiVoice(UncheckedBaseModel):
14
14
  accent: typing.Optional[str] = pydantic.Field(default=None)
15
15
  """
16
16
  This field has been deprecated. Please refer to 'supportedLocales.detail' instead.
@@ -0,0 +1,27 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ import pydantic
5
+ import typing
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+
8
+
9
+ class AudioOutput(UncheckedBaseModel):
10
+ audio: str = pydantic.Field()
11
+ """
12
+ Base64 encoded audio data
13
+ """
14
+
15
+ context_id: typing.Optional[str] = pydantic.Field(default=None)
16
+ """
17
+ Optional context identifier
18
+ """
19
+
20
+ if IS_PYDANTIC_V2:
21
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
+ else:
23
+
24
+ class Config:
25
+ frozen = True
26
+ smart_union = True
27
+ extra = pydantic.Extra.allow
@@ -1,6 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing_extensions
5
5
  import typing
6
6
  from ..core.serialization import FieldMetadata
@@ -8,7 +8,7 @@ import pydantic
8
8
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
9
 
10
10
 
11
- class AuthTokenResponse(UniversalBaseModel):
11
+ class AuthTokenResponse(UncheckedBaseModel):
12
12
  expiry_in_epoch_millis: typing_extensions.Annotated[
13
13
  typing.Optional[int], FieldMetadata(alias="expiryInEpochMillis")
14
14
  ] = pydantic.Field(default=None)
@@ -1,12 +1,12 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
6
  import pydantic
7
7
 
8
8
 
9
- class CharacterCount(UniversalBaseModel):
9
+ class CharacterCount(UncheckedBaseModel):
10
10
  total_source_text_length: typing.Optional[int] = None
11
11
  total_translated_text_length: typing.Optional[int] = None
12
12
 
@@ -0,0 +1,20 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
5
+ import typing
6
+ import pydantic
7
+
8
+
9
+ class ClearContext(UncheckedBaseModel):
10
+ clear: bool
11
+ context_id: str
12
+
13
+ if IS_PYDANTIC_V2:
14
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
15
+ else:
16
+
17
+ class Config:
18
+ frozen = True
19
+ smart_union = True
20
+ extra = pydantic.Extra.allow
@@ -1,12 +1,12 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
6
  import pydantic
7
7
 
8
8
 
9
- class DubApiDetailResponse(UniversalBaseModel):
9
+ class DubApiDetailResponse(UncheckedBaseModel):
10
10
  locale: typing.Optional[str] = None
11
11
  status: typing.Optional[str] = None
12
12
  error_message: typing.Optional[str] = None
@@ -1,13 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  import pydantic
6
6
  from .dub_api_detail_response import DubApiDetailResponse
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
 
9
9
 
10
- class DubJobStatusResponse(UniversalBaseModel):
10
+ class DubJobStatusResponse(UncheckedBaseModel):
11
11
  project_id: typing.Optional[str] = pydantic.Field(default=None)
12
12
  """
13
13
  Your Project Id
@@ -0,0 +1,27 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ import pydantic
5
+ import typing
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+
8
+
9
+ class FinalOutput(UncheckedBaseModel):
10
+ final: bool = pydantic.Field()
11
+ """
12
+ Indicates if the audio is final, you will not receive audio param in this message
13
+ """
14
+
15
+ context_id: typing.Optional[str] = pydantic.Field(default=None)
16
+ """
17
+ Optional context identifier
18
+ """
19
+
20
+ if IS_PYDANTIC_V2:
21
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
+ else:
23
+
24
+ class Config:
25
+ frozen = True
26
+ smart_union = True
27
+ extra = pydantic.Extra.allow
@@ -1,6 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  import typing_extensions
6
6
  from ..core.serialization import FieldMetadata
@@ -9,7 +9,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
9
  import pydantic
10
10
 
11
11
 
12
- class FormDataContentDisposition(UniversalBaseModel):
12
+ class FormDataContentDisposition(UncheckedBaseModel):
13
13
  type: typing.Optional[str] = None
14
14
  parameters: typing.Optional[typing.Dict[str, str]] = None
15
15
  file_name: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="fileName")] = None
@@ -1,6 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing_extensions
5
5
  from ..core.serialization import FieldMetadata
6
6
  import pydantic
@@ -9,7 +9,7 @@ from .word_duration_response import WordDurationResponse
9
9
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
10
10
 
11
11
 
12
- class GenerateSpeechResponse(UniversalBaseModel):
12
+ class GenerateSpeechResponse(UncheckedBaseModel):
13
13
  audio_file: typing_extensions.Annotated[str, FieldMetadata(alias="audioFile")]
14
14
  audio_length_in_seconds: typing_extensions.Annotated[float, FieldMetadata(alias="audioLengthInSeconds")]
15
15
  consumed_character_count: typing_extensions.Annotated[int, FieldMetadata(alias="consumedCharacterCount")] = (
@@ -1,13 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  from .api_project_response import ApiProjectResponse
6
6
  import pydantic
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
 
9
9
 
10
- class GroupApiProjectResponse(UniversalBaseModel):
10
+ class GroupApiProjectResponse(UncheckedBaseModel):
11
11
  next: typing.Optional[str] = None
12
12
  projects: typing.List[ApiProjectResponse] = pydantic.Field()
13
13
  """
@@ -1,13 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  from .locale_response_supports_item import LocaleResponseSupportsItem
6
6
  import pydantic
7
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
 
9
9
 
10
- class LocaleResponse(UniversalBaseModel):
10
+ class LocaleResponse(UncheckedBaseModel):
11
11
  locale: str
12
12
  language: str
13
13
  supports: typing.List[LocaleResponseSupportsItem] = pydantic.Field()
murf/types/metadata.py CHANGED
@@ -1,13 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  from .character_count import CharacterCount
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
7
  import pydantic
8
8
 
9
9
 
10
- class Metadata(UniversalBaseModel):
10
+ class Metadata(UncheckedBaseModel):
11
11
  character_count: typing.Optional[CharacterCount] = None
12
12
  credits_used: typing.Optional[float] = None
13
13
  target_language: typing.Optional[str] = None
@@ -1,6 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  from .metadata import Metadata
6
6
  from .translation import Translation
@@ -8,7 +8,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
8
  import pydantic
9
9
 
10
10
 
11
- class MurfApiTranslationResponse(UniversalBaseModel):
11
+ class MurfApiTranslationResponse(UncheckedBaseModel):
12
12
  metadata: typing.Optional[Metadata] = None
13
13
  translations: typing.Optional[typing.List[Translation]] = None
14
14
 
@@ -1,13 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from ..core.pydantic_utilities import UniversalBaseModel
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  from .pronunciation_detail_type import PronunciationDetailType
6
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
7
  import pydantic
8
8
 
9
9
 
10
- class PronunciationDetail(UniversalBaseModel):
10
+ class PronunciationDetail(UncheckedBaseModel):
11
11
  """
12
12
  An object used to define custom pronunciations.
13
13
 
@@ -0,0 +1,35 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ import pydantic
5
+ import typing
6
+ from .send_text_voice_config import SendTextVoiceConfig
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+
9
+
10
+ class SendText(UncheckedBaseModel):
11
+ text: str = pydantic.Field()
12
+ """
13
+ The text to convert to speech
14
+ """
15
+
16
+ context_id: typing.Optional[str] = pydantic.Field(default=None)
17
+ """
18
+ Optional context identifier
19
+ """
20
+
21
+ end: typing.Optional[bool] = pydantic.Field(default=None)
22
+ """
23
+ Indicates if this is the end of the text stream (optional)
24
+ """
25
+
26
+ voice_config: typing.Optional[SendTextVoiceConfig] = None
27
+
28
+ if IS_PYDANTIC_V2:
29
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
30
+ else:
31
+
32
+ class Config:
33
+ frozen = True
34
+ smart_union = True
35
+ extra = pydantic.Extra.allow
@@ -0,0 +1,55 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ import typing
5
+ import pydantic
6
+ from .send_text_voice_config_pronunciation_dictionary_value import SendTextVoiceConfigPronunciationDictionaryValue
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+
9
+
10
+ class SendTextVoiceConfig(UncheckedBaseModel):
11
+ voice_id: typing.Optional[str] = pydantic.Field(default=None)
12
+ """
13
+ Voice ID to use for TTS. Defaults to "en-US-daniel"
14
+ """
15
+
16
+ style: typing.Optional[str] = pydantic.Field(default=None)
17
+ """
18
+ The style of speech (optional)
19
+ """
20
+
21
+ rate: typing.Optional[int] = pydantic.Field(default=None)
22
+ """
23
+ Speech rate (optional)
24
+ """
25
+
26
+ pitch: typing.Optional[int] = pydantic.Field(default=None)
27
+ """
28
+ Speech pitch (optional)
29
+ """
30
+
31
+ pronunciation_dictionary: typing.Optional[typing.Dict[str, SendTextVoiceConfigPronunciationDictionaryValue]] = (
32
+ pydantic.Field(default=None)
33
+ )
34
+ """
35
+ A map of words to their pronunciation details. Example 1: {"live":{"type": "IPA", "pronunciation": "laɪv"}}.
36
+ """
37
+
38
+ variation: typing.Optional[int] = pydantic.Field(default=None)
39
+ """
40
+ Higher values will add more variation in terms of Pause, Pitch, and Speed to the voice. Only available for Gen2 model.
41
+ """
42
+
43
+ multi_native_locale: typing.Optional[str] = pydantic.Field(default=None)
44
+ """
45
+ Specifies the language for the generated audio, enabling a voice to speak in multiple languages natively. Only available in the Gen2 model. Valid values: "en-US", "en-UK", "es-ES", etc. Use the GET /v1/speed/voices endpoint to retrieve the list of available voices and languages.
46
+ """
47
+
48
+ if IS_PYDANTIC_V2:
49
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
50
+ else:
51
+
52
+ class Config:
53
+ frozen = True
54
+ smart_union = True
55
+ extra = pydantic.Extra.allow
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ from .send_text_voice_config_pronunciation_dictionary_value_type import (
5
+ SendTextVoiceConfigPronunciationDictionaryValueType,
6
+ )
7
+ import pydantic
8
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
+ import typing
10
+
11
+
12
+ class SendTextVoiceConfigPronunciationDictionaryValue(UncheckedBaseModel):
13
+ type: SendTextVoiceConfigPronunciationDictionaryValueType = pydantic.Field()
14
+ """
15
+ Type of pronunciation (IPA or SAY_AS)
16
+ """
17
+
18
+ pronunciation: str = pydantic.Field()
19
+ """
20
+ The actual pronunciation string
21
+ """
22
+
23
+ if IS_PYDANTIC_V2:
24
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
25
+ else:
26
+
27
+ class Config:
28
+ frozen = True
29
+ smart_union = True
30
+ extra = pydantic.Extra.allow
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ SendTextVoiceConfigPronunciationDictionaryValueType = typing.Union[typing.Literal["IPA", "SAY_AS"], typing.Any]
@@ -0,0 +1,20 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ import typing
5
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import pydantic
7
+
8
+
9
+ class SetAdvancedSettings(UncheckedBaseModel):
10
+ min_buffer_size: typing.Optional[int] = None
11
+ max_buffer_delay_in_ms: typing.Optional[int] = None
12
+
13
+ if IS_PYDANTIC_V2:
14
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
15
+ else:
16
+
17
+ class Config:
18
+ frozen = True
19
+ smart_union = True
20
+ extra = pydantic.Extra.allow
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ from .set_voice_configuration_or_initialize_context_voice_config import (
5
+ SetVoiceConfigurationOrInitializeContextVoiceConfig,
6
+ )
7
+ import typing
8
+ import pydantic
9
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
10
+
11
+
12
+ class SetVoiceConfigurationOrInitializeContext(UncheckedBaseModel):
13
+ voice_config: SetVoiceConfigurationOrInitializeContextVoiceConfig
14
+ context_id: typing.Optional[str] = pydantic.Field(default=None)
15
+ """
16
+ Optional context identifier
17
+ """
18
+
19
+ if IS_PYDANTIC_V2:
20
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow
@@ -0,0 +1,57 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ import typing
5
+ import pydantic
6
+ from .set_voice_configuration_or_initialize_context_voice_config_pronunciation_dictionary_value import (
7
+ SetVoiceConfigurationOrInitializeContextVoiceConfigPronunciationDictionaryValue,
8
+ )
9
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
10
+
11
+
12
+ class SetVoiceConfigurationOrInitializeContextVoiceConfig(UncheckedBaseModel):
13
+ voice_id: typing.Optional[str] = pydantic.Field(default=None)
14
+ """
15
+ Voice ID to use for TTS. Defaults to "en-US-daniel"
16
+ """
17
+
18
+ style: typing.Optional[str] = pydantic.Field(default=None)
19
+ """
20
+ The style of speech (optional)
21
+ """
22
+
23
+ rate: typing.Optional[int] = pydantic.Field(default=None)
24
+ """
25
+ Speech rate (optional)
26
+ """
27
+
28
+ pitch: typing.Optional[int] = pydantic.Field(default=None)
29
+ """
30
+ Speech pitch (optional)
31
+ """
32
+
33
+ pronunciation_dictionary: typing.Optional[
34
+ typing.Dict[str, SetVoiceConfigurationOrInitializeContextVoiceConfigPronunciationDictionaryValue]
35
+ ] = pydantic.Field(default=None)
36
+ """
37
+ A map of words to their pronunciation details. Example 1: {"live":{"type": "IPA", "pronunciation": "laɪv"}}.
38
+ """
39
+
40
+ variation: typing.Optional[int] = pydantic.Field(default=None)
41
+ """
42
+ Higher values will add more variation in terms of Pause, Pitch, and Speed to the voice. Only available for Gen2 model.
43
+ """
44
+
45
+ multi_native_locale: typing.Optional[str] = pydantic.Field(default=None)
46
+ """
47
+ Specifies the language for the generated audio, enabling a voice to speak in multiple languages natively. Only available in the Gen2 model. Valid values: "en-US", "en-UK", "es-ES", etc. Use the GET /v1/speed/voices endpoint to retrieve the list of available voices and languages.
48
+ """
49
+
50
+ if IS_PYDANTIC_V2:
51
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
52
+ else:
53
+
54
+ class Config:
55
+ frozen = True
56
+ smart_union = True
57
+ extra = pydantic.Extra.allow