spitch 1.11.0__py3-none-any.whl → 1.12.0__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 spitch might be problematic. Click here for more details.
- spitch/_version.py +1 -1
- spitch/resources/speech.py +5 -4
- spitch/resources/text.py +10 -8
- spitch/types/__init__.py +3 -0
- spitch/types/speech_transcribe_response.py +25 -0
- spitch/types/text_tone_mark_response.py +13 -0
- spitch/types/text_translate_response.py +13 -0
- {spitch-1.11.0.dist-info → spitch-1.12.0.dist-info}/METADATA +1 -1
- {spitch-1.11.0.dist-info → spitch-1.12.0.dist-info}/RECORD +11 -8
- {spitch-1.11.0.dist-info → spitch-1.12.0.dist-info}/WHEEL +0 -0
- {spitch-1.11.0.dist-info → spitch-1.12.0.dist-info}/licenses/LICENSE +0 -0
spitch/_version.py
CHANGED
spitch/resources/speech.py
CHANGED
|
@@ -32,6 +32,7 @@ from .._response import (
|
|
|
32
32
|
async_to_custom_streamed_response_wrapper,
|
|
33
33
|
)
|
|
34
34
|
from .._base_client import make_request_options
|
|
35
|
+
from ..types.speech_transcribe_response import SpeechTranscribeResponse
|
|
35
36
|
|
|
36
37
|
__all__ = ["SpeechResource", "AsyncSpeechResource"]
|
|
37
38
|
|
|
@@ -117,7 +118,7 @@ class SpeechResource(SyncAPIResource):
|
|
|
117
118
|
extra_query: Query | None = None,
|
|
118
119
|
extra_body: Body | None = None,
|
|
119
120
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
120
|
-
) ->
|
|
121
|
+
) -> SpeechTranscribeResponse:
|
|
121
122
|
"""
|
|
122
123
|
Transcribe
|
|
123
124
|
|
|
@@ -151,7 +152,7 @@ class SpeechResource(SyncAPIResource):
|
|
|
151
152
|
options=make_request_options(
|
|
152
153
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
153
154
|
),
|
|
154
|
-
cast_to=
|
|
155
|
+
cast_to=SpeechTranscribeResponse,
|
|
155
156
|
)
|
|
156
157
|
|
|
157
158
|
|
|
@@ -236,7 +237,7 @@ class AsyncSpeechResource(AsyncAPIResource):
|
|
|
236
237
|
extra_query: Query | None = None,
|
|
237
238
|
extra_body: Body | None = None,
|
|
238
239
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
239
|
-
) ->
|
|
240
|
+
) -> SpeechTranscribeResponse:
|
|
240
241
|
"""
|
|
241
242
|
Transcribe
|
|
242
243
|
|
|
@@ -270,7 +271,7 @@ class AsyncSpeechResource(AsyncAPIResource):
|
|
|
270
271
|
options=make_request_options(
|
|
271
272
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
272
273
|
),
|
|
273
|
-
cast_to=
|
|
274
|
+
cast_to=SpeechTranscribeResponse,
|
|
274
275
|
)
|
|
275
276
|
|
|
276
277
|
|
spitch/resources/text.py
CHANGED
|
@@ -21,6 +21,8 @@ from .._response import (
|
|
|
21
21
|
async_to_streamed_response_wrapper,
|
|
22
22
|
)
|
|
23
23
|
from .._base_client import make_request_options
|
|
24
|
+
from ..types.text_tone_mark_response import TextToneMarkResponse
|
|
25
|
+
from ..types.text_translate_response import TextTranslateResponse
|
|
24
26
|
|
|
25
27
|
__all__ = ["TextResource", "AsyncTextResource"]
|
|
26
28
|
|
|
@@ -56,7 +58,7 @@ class TextResource(SyncAPIResource):
|
|
|
56
58
|
extra_query: Query | None = None,
|
|
57
59
|
extra_body: Body | None = None,
|
|
58
60
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
59
|
-
) ->
|
|
61
|
+
) -> TextToneMarkResponse:
|
|
60
62
|
"""
|
|
61
63
|
Tone Mark
|
|
62
64
|
|
|
@@ -81,7 +83,7 @@ class TextResource(SyncAPIResource):
|
|
|
81
83
|
options=make_request_options(
|
|
82
84
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
83
85
|
),
|
|
84
|
-
cast_to=
|
|
86
|
+
cast_to=TextToneMarkResponse,
|
|
85
87
|
)
|
|
86
88
|
|
|
87
89
|
def translate(
|
|
@@ -96,7 +98,7 @@ class TextResource(SyncAPIResource):
|
|
|
96
98
|
extra_query: Query | None = None,
|
|
97
99
|
extra_body: Body | None = None,
|
|
98
100
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
99
|
-
) ->
|
|
101
|
+
) -> TextTranslateResponse:
|
|
100
102
|
"""
|
|
101
103
|
Translate
|
|
102
104
|
|
|
@@ -122,7 +124,7 @@ class TextResource(SyncAPIResource):
|
|
|
122
124
|
options=make_request_options(
|
|
123
125
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
124
126
|
),
|
|
125
|
-
cast_to=
|
|
127
|
+
cast_to=TextTranslateResponse,
|
|
126
128
|
)
|
|
127
129
|
|
|
128
130
|
|
|
@@ -157,7 +159,7 @@ class AsyncTextResource(AsyncAPIResource):
|
|
|
157
159
|
extra_query: Query | None = None,
|
|
158
160
|
extra_body: Body | None = None,
|
|
159
161
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
160
|
-
) ->
|
|
162
|
+
) -> TextToneMarkResponse:
|
|
161
163
|
"""
|
|
162
164
|
Tone Mark
|
|
163
165
|
|
|
@@ -182,7 +184,7 @@ class AsyncTextResource(AsyncAPIResource):
|
|
|
182
184
|
options=make_request_options(
|
|
183
185
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
184
186
|
),
|
|
185
|
-
cast_to=
|
|
187
|
+
cast_to=TextToneMarkResponse,
|
|
186
188
|
)
|
|
187
189
|
|
|
188
190
|
async def translate(
|
|
@@ -197,7 +199,7 @@ class AsyncTextResource(AsyncAPIResource):
|
|
|
197
199
|
extra_query: Query | None = None,
|
|
198
200
|
extra_body: Body | None = None,
|
|
199
201
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
200
|
-
) ->
|
|
202
|
+
) -> TextTranslateResponse:
|
|
201
203
|
"""
|
|
202
204
|
Translate
|
|
203
205
|
|
|
@@ -223,7 +225,7 @@ class AsyncTextResource(AsyncAPIResource):
|
|
|
223
225
|
options=make_request_options(
|
|
224
226
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
225
227
|
),
|
|
226
|
-
cast_to=
|
|
228
|
+
cast_to=TextTranslateResponse,
|
|
227
229
|
)
|
|
228
230
|
|
|
229
231
|
|
spitch/types/__init__.py
CHANGED
|
@@ -5,4 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
from .text_tone_mark_params import TextToneMarkParams as TextToneMarkParams
|
|
6
6
|
from .text_translate_params import TextTranslateParams as TextTranslateParams
|
|
7
7
|
from .speech_generate_params import SpeechGenerateParams as SpeechGenerateParams
|
|
8
|
+
from .text_tone_mark_response import TextToneMarkResponse as TextToneMarkResponse
|
|
9
|
+
from .text_translate_response import TextTranslateResponse as TextTranslateResponse
|
|
8
10
|
from .speech_transcribe_params import SpeechTranscribeParams as SpeechTranscribeParams
|
|
11
|
+
from .speech_transcribe_response import SpeechTranscribeResponse as SpeechTranscribeResponse
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["SpeechTranscribeResponse", "Segment"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Segment(BaseModel):
|
|
11
|
+
end: Optional[int] = None
|
|
12
|
+
|
|
13
|
+
speaker: Optional[int] = None
|
|
14
|
+
|
|
15
|
+
start: Optional[int] = None
|
|
16
|
+
|
|
17
|
+
text: Optional[int] = None
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class SpeechTranscribeResponse(BaseModel):
|
|
21
|
+
request_id: str
|
|
22
|
+
|
|
23
|
+
segment: Optional[List[Optional[Segment]]] = None
|
|
24
|
+
|
|
25
|
+
text: Optional[str] = None
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["TextToneMarkResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TextToneMarkResponse(BaseModel):
|
|
11
|
+
request_id: str
|
|
12
|
+
|
|
13
|
+
text: Optional[str] = None
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from .._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["TextTranslateResponse"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TextTranslateResponse(BaseModel):
|
|
11
|
+
request_id: str
|
|
12
|
+
|
|
13
|
+
text: Optional[str] = None
|
|
@@ -11,7 +11,7 @@ spitch/_resource.py,sha256=TLFPcOOmtxZOQLh3XCNPB_BdrQpp0MIYoKoH52aRAu8,1100
|
|
|
11
11
|
spitch/_response.py,sha256=aN6swtguiZ7CC_hWFrwoUa53FgSbjRfZXxYHvfDNGeo,28609
|
|
12
12
|
spitch/_streaming.py,sha256=5SpId2EIfF8Ee8UUYmJxqgHUGP1ZdHCUHhHCdNJREFA,10100
|
|
13
13
|
spitch/_types.py,sha256=dsJyGWdBXaYJaRBqn2V3iRsfpWw71rFaSxdSM8sPQYY,6103
|
|
14
|
-
spitch/_version.py,sha256=
|
|
14
|
+
spitch/_version.py,sha256=W2PbCOPPdvjlkneI70TPUD_eeRC3zipzbCLonB33DWM,159
|
|
15
15
|
spitch/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
spitch/_utils/__init__.py,sha256=Uzq1-FIih_VUjzdNVWXks0sdC39KBKLMrZoz-_JOjJ4,1988
|
|
17
17
|
spitch/_utils/_logs.py,sha256=ApRyYK_WgZfEr_ygBUBXWMlTgeMr2tdNOGlH8jE4oJc,774
|
|
@@ -24,15 +24,18 @@ spitch/_utils/_typing.py,sha256=tFbktdpdHCQliwzGsWysgn0P5H0JRdagkZdb_LegGkY,3838
|
|
|
24
24
|
spitch/_utils/_utils.py,sha256=tYrr7IX-5NMwsVKbNggbzOM84uNw7XnAe06e2Ln8Or0,11472
|
|
25
25
|
spitch/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
26
26
|
spitch/resources/__init__.py,sha256=KT6rAvIlWHQk9QdM4Jp8ABziKILaBrrtiO7LCB5Wa5E,976
|
|
27
|
-
spitch/resources/speech.py,sha256=
|
|
28
|
-
spitch/resources/text.py,sha256=
|
|
29
|
-
spitch/types/__init__.py,sha256=
|
|
27
|
+
spitch/resources/speech.py,sha256=kmiAXGaunsCoTDQphcazwcDTeBPINXnJA1I3EFmuNmg,12365
|
|
28
|
+
spitch/resources/text.py,sha256=Gno8dQg7jeL8rslqqURyu4t-5_lLwziYgCRvgY8V9XM,9665
|
|
29
|
+
spitch/types/__init__.py,sha256=xBZbzXwV3WlBdawp4Mb4IqoQG4VfaLbi-4FMqPbwqlE,704
|
|
30
30
|
spitch/types/speech_generate_params.py,sha256=kNVcFxcIcImiLa8r4OEbzeIOqZNtkbSUek99t2ljhaI,425
|
|
31
31
|
spitch/types/speech_transcibe_params.py,sha256=WvwBsSctqJDXOFJNYyjfijwCnAdJCPkJobESfmLy3aI,448
|
|
32
32
|
spitch/types/speech_transcribe_params.py,sha256=2nUgsYIURWTKx8qBYE0WfIHh6hXVcdgCz-UC1wIaXpA,515
|
|
33
|
+
spitch/types/speech_transcribe_response.py,sha256=if2u4Me_bfI5NEOPFMK1r_3X8aGqFZacxzAml5EciBk,515
|
|
33
34
|
spitch/types/text_tone_mark_params.py,sha256=63P5VElxanYkDP1ZLEuQt97JSgVpMCaAo4WRWLDvhlY,349
|
|
35
|
+
spitch/types/text_tone_mark_response.py,sha256=WGxZsBxLceZ03VM5dafZshp6azdDxpNHcJHhBX7A5DY,277
|
|
34
36
|
spitch/types/text_translate_params.py,sha256=rU5hbTyBaP5L_akmgswHoNLcTKWN0Gz1kL1yt3EQL44,404
|
|
35
|
-
spitch
|
|
36
|
-
spitch-1.
|
|
37
|
-
spitch-1.
|
|
38
|
-
spitch-1.
|
|
37
|
+
spitch/types/text_translate_response.py,sha256=Az3QSpvarlCNTiB7uVzMH21YoWHWJMBEvgdKgVJZW4M,279
|
|
38
|
+
spitch-1.12.0.dist-info/METADATA,sha256=Zy_fSR5rar1h8cVRdyvN-izyVipADFAG4XoZdrXPWWM,12512
|
|
39
|
+
spitch-1.12.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
40
|
+
spitch-1.12.0.dist-info/licenses/LICENSE,sha256=529F8Amq5MfoIm33JY544oweKES9vw9_xS1CNx-ztPI,11336
|
|
41
|
+
spitch-1.12.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|