Skip to content

Commit 2db598c

Browse files
🌿 Fern Regeneration -- April 2, 2025 (#255)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: twitchard <[email protected]>
1 parent 40057f4 commit 2db598c

File tree

11 files changed

+80
-33
lines changed

11 files changed

+80
-33
lines changed

.mock/definition/tts/__package__.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,29 @@ types:
404404
docs: The index of the utterance in the request this snippet corresponds to.
405405
source:
406406
openapi: tts-openapi.yml
407+
SnippetAudioChunk:
408+
properties:
409+
audio:
410+
type: string
411+
docs: The generated audio output chunk in the requested format.
412+
chunk_index:
413+
type: integer
414+
docs: The index of the audio chunk in the snippet.
415+
generation_id:
416+
type: string
417+
docs: The generation ID the parent snippet that this chunk corresponds to.
418+
is_last_chunk:
419+
type: boolean
420+
docs: >-
421+
Whether or not this is the last chunk streamed back from the decoder
422+
for one input snippet.
423+
utterance_index:
424+
type: optional<integer>
425+
docs: >-
426+
The index of the utterance in the request the parent snippet of this
427+
chunk corresponds to.
428+
source:
429+
openapi: tts-openapi.yml
407430
PostedUtterance:
408431
properties:
409432
description:

.mock/definition/tts/voices.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
types:
2-
VoicesListRequestProvider:
3-
enum:
4-
- HUME_AI
5-
- CUSTOM_VOICE
6-
source:
7-
openapi: tts-openapi.yml
81
imports:
92
root: __package__.yml
103
service:
@@ -26,7 +19,7 @@ service:
2619
name: VoicesListRequest
2720
query-parameters:
2821
provider:
29-
type: VoicesListRequestProvider
22+
type: root.VoiceProvider
3023
docs: >-
3124
Specifies whether to return custom voices created in your account
3225
or shared voices provided by Hume

poetry.lock

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

reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ client.tts.voices.list(
552552
<dl>
553553
<dd>
554554

555-
**provider:** `VoicesListRequestProvider` — Specifies whether to return custom voices created in your account or shared voices provided by Hume
555+
**provider:** `VoiceProvider` — Specifies whether to return custom voices created in your account or shared voices provided by Hume
556556

557557
</dd>
558558
</dl>

src/hume/tts/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
ReturnTts,
2323
ReturnVoice,
2424
Snippet,
25+
SnippetAudioChunk,
2526
ValidationError,
2627
ValidationErrorLocItem,
2728
VoiceProvider,
2829
)
2930
from .errors import BadRequestError, UnprocessableEntityError
3031
from . import voices
31-
from .voices import VoicesListRequestProvider
3232

3333
__all__ = [
3434
"AudioEncoding",
@@ -53,10 +53,10 @@
5353
"ReturnTts",
5454
"ReturnVoice",
5555
"Snippet",
56+
"SnippetAudioChunk",
5657
"UnprocessableEntityError",
5758
"ValidationError",
5859
"ValidationErrorLocItem",
5960
"VoiceProvider",
60-
"VoicesListRequestProvider",
6161
"voices",
6262
]

src/hume/tts/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .return_tts import ReturnTts
2222
from .return_voice import ReturnVoice
2323
from .snippet import Snippet
24+
from .snippet_audio_chunk import SnippetAudioChunk
2425
from .validation_error import ValidationError
2526
from .validation_error_loc_item import ValidationErrorLocItem
2627
from .voice_provider import VoiceProvider
@@ -47,6 +48,7 @@
4748
"ReturnTts",
4849
"ReturnVoice",
4950
"Snippet",
51+
"SnippetAudioChunk",
5052
"ValidationError",
5153
"ValidationErrorLocItem",
5254
"VoiceProvider",
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
from ...core.pydantic_utilities import UniversalBaseModel
4+
import pydantic
5+
import typing
6+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
7+
8+
9+
class SnippetAudioChunk(UniversalBaseModel):
10+
audio: str = pydantic.Field()
11+
"""
12+
The generated audio output chunk in the requested format.
13+
"""
14+
15+
chunk_index: int = pydantic.Field()
16+
"""
17+
The index of the audio chunk in the snippet.
18+
"""
19+
20+
generation_id: str = pydantic.Field()
21+
"""
22+
The generation ID the parent snippet that this chunk corresponds to.
23+
"""
24+
25+
is_last_chunk: bool = pydantic.Field()
26+
"""
27+
Whether or not this is the last chunk streamed back from the decoder for one input snippet.
28+
"""
29+
30+
utterance_index: typing.Optional[int] = pydantic.Field(default=None)
31+
"""
32+
The index of the utterance in the request the parent snippet of this chunk corresponds to.
33+
"""
34+
35+
if IS_PYDANTIC_V2:
36+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
37+
else:
38+
39+
class Config:
40+
frozen = True
41+
smart_union = True
42+
extra = pydantic.Extra.allow

src/hume/tts/voices/__init__.py

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 VoicesListRequestProvider
4-
5-
__all__ = ["VoicesListRequestProvider"]

src/hume/tts/voices/client.py

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

33
import typing
44
from ...core.client_wrapper import SyncClientWrapper
5-
from .types.voices_list_request_provider import VoicesListRequestProvider
5+
from ..types.voice_provider import VoiceProvider
66
from ...core.request_options import RequestOptions
77
from ..types.return_paged_voices import ReturnPagedVoices
88
from ...core.pydantic_utilities import parse_obj_as
@@ -26,7 +26,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
2626
def list(
2727
self,
2828
*,
29-
provider: VoicesListRequestProvider,
29+
provider: VoiceProvider,
3030
page_number: typing.Optional[int] = None,
3131
page_size: typing.Optional[int] = None,
3232
ascending_order: typing.Optional[bool] = None,
@@ -37,7 +37,7 @@ def list(
3737
3838
Parameters
3939
----------
40-
provider : VoicesListRequestProvider
40+
provider : VoiceProvider
4141
Specifies whether to return custom voices created in your account or shared voices provided by Hume
4242
4343
page_number : typing.Optional[int]
@@ -235,7 +235,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
235235
async def list(
236236
self,
237237
*,
238-
provider: VoicesListRequestProvider,
238+
provider: VoiceProvider,
239239
page_number: typing.Optional[int] = None,
240240
page_size: typing.Optional[int] = None,
241241
ascending_order: typing.Optional[bool] = None,
@@ -246,7 +246,7 @@ async def list(
246246
247247
Parameters
248248
----------
249-
provider : VoicesListRequestProvider
249+
provider : VoiceProvider
250250
Specifies whether to return custom voices created in your account or shared voices provided by Hume
251251
252252
page_number : typing.Optional[int]

src/hume/tts/voices/types/__init__.py

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

0 commit comments

Comments
 (0)