most-client 1.0.34__py3-none-any.whl → 1.0.36__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.
- most/api.py +18 -2
- most/async_api.py +18 -2
- {most_client-1.0.34.dist-info → most_client-1.0.36.dist-info}/METADATA +1 -1
- {most_client-1.0.34.dist-info → most_client-1.0.36.dist-info}/RECORD +7 -7
- {most_client-1.0.34.dist-info → most_client-1.0.36.dist-info}/WHEEL +1 -1
- {most_client-1.0.34.dist-info → most_client-1.0.36.dist-info}/top_level.txt +0 -0
- {most_client-1.0.34.dist-info → most_client-1.0.36.dist-info}/zip-safe +0 -0
most/api.py
CHANGED
@@ -213,8 +213,12 @@ class MostClient(object):
|
|
213
213
|
|
214
214
|
def list_audios(self,
|
215
215
|
offset: int = 0,
|
216
|
-
limit: int = 10
|
217
|
-
|
216
|
+
limit: int = 10,
|
217
|
+
query: Optional[Dict[str, str]] = None) -> List[Audio]:
|
218
|
+
if query is None:
|
219
|
+
query = {}
|
220
|
+
resp = self.get(f"/{self.client_id}/list?offset={offset}&limit={limit}",
|
221
|
+
params=query)
|
218
222
|
audio_list = resp.json()
|
219
223
|
return self.retort.load(audio_list, List[Audio])
|
220
224
|
|
@@ -279,6 +283,18 @@ class MostClient(object):
|
|
279
283
|
result = self.score_modifier.modify(result)
|
280
284
|
return result
|
281
285
|
|
286
|
+
def transcribe_later(self, audio_id,
|
287
|
+
overwrite: bool = False) -> DialogResult:
|
288
|
+
if not is_valid_id(self.model_id):
|
289
|
+
raise RuntimeError("Please choose valid model to apply. [try list_models()]")
|
290
|
+
|
291
|
+
if not is_valid_id(audio_id):
|
292
|
+
raise RuntimeError("Please use valid audio_id. [try audio.id from list_audios()]")
|
293
|
+
|
294
|
+
resp = self.post(f"/{self.client_id}/audio/{audio_id}/model/{self.model_id}/transcribe_async",
|
295
|
+
params={"overwrite": overwrite})
|
296
|
+
return self.retort.load(resp.json(), DialogResult)
|
297
|
+
|
282
298
|
def apply_later(self, audio_id,
|
283
299
|
modify_scores: bool = False,
|
284
300
|
overwrite: bool = False) -> Result:
|
most/async_api.py
CHANGED
@@ -223,8 +223,12 @@ class AsyncMostClient(object):
|
|
223
223
|
|
224
224
|
async def list_audios(self,
|
225
225
|
offset: int = 0,
|
226
|
-
limit: int = 10
|
227
|
-
|
226
|
+
limit: int = 10,
|
227
|
+
query: Optional[Dict[str, str]] = None) -> List[Audio]:
|
228
|
+
if query is None:
|
229
|
+
query = {}
|
230
|
+
resp = await self.get(f"/{self.client_id}/list?offset={offset}&limit={limit}",
|
231
|
+
params=query)
|
228
232
|
audio_list = resp.json()
|
229
233
|
return self.retort.load(audio_list, List[Audio])
|
230
234
|
|
@@ -289,6 +293,18 @@ class AsyncMostClient(object):
|
|
289
293
|
result = self.score_modifier.modify(result)
|
290
294
|
return result
|
291
295
|
|
296
|
+
async def transcribe_later(self, audio_id,
|
297
|
+
overwrite: bool = False) -> DialogResult:
|
298
|
+
if not is_valid_id(self.model_id):
|
299
|
+
raise RuntimeError("Please choose valid model to apply. [try list_models()]")
|
300
|
+
|
301
|
+
if not is_valid_id(audio_id):
|
302
|
+
raise RuntimeError("Please use valid audio_id. [try audio.id from list_audios()]")
|
303
|
+
|
304
|
+
resp = await self.post(f"/{self.client_id}/audio/{audio_id}/model/{self.model_id}/transcribe_async",
|
305
|
+
params={"overwrite": overwrite})
|
306
|
+
return self.retort.load(resp.json(), DialogResult)
|
307
|
+
|
292
308
|
async def apply_later(self, audio_id,
|
293
309
|
modify_scores: bool = False,
|
294
310
|
overwrite: bool = False) -> Result:
|
@@ -1,13 +1,13 @@
|
|
1
1
|
most/__init__.py,sha256=b0EXXaPA4kmt-FtGXKRWZr7SCwjipMLcpC6uT5WRIdY,144
|
2
2
|
most/_constrants.py,sha256=SlHKcBoXwe_sPzk8tdbb7lqhQz-Bfo__FhSoeFWodZE,217
|
3
|
-
most/api.py,sha256=
|
4
|
-
most/async_api.py,sha256=
|
3
|
+
most/api.py,sha256=vg7zYsRebQjVOmTLRQE6jqmK-zG1j-k-KMN68gzFpk4,19538
|
4
|
+
most/async_api.py,sha256=iRIjHLVkrjBKimlVmz5Ev_pPNB0dwCa5QgKRy1rCF3c,20753
|
5
5
|
most/async_trainer_api.py,sha256=99rED8RjnOn8VezeEgrTgoVfQrO7DdmOE2Jajumno2g,1052
|
6
6
|
most/score_calculation.py,sha256=1XU1LfIH5LSCwAbAaKkr-EjH5qOTXrJKOUvhCCawka4,1054
|
7
7
|
most/trainer_api.py,sha256=ZwOv4mhROfY97n6i7IY_ZpafsuNRazOqMBAf2dh708k,992
|
8
8
|
most/types.py,sha256=KP34dzS8ayQUhToIxwxTL9O8-7TZz1ySfJzA3ZNGIGw,4921
|
9
|
-
most_client-1.0.
|
10
|
-
most_client-1.0.
|
11
|
-
most_client-1.0.
|
12
|
-
most_client-1.0.
|
13
|
-
most_client-1.0.
|
9
|
+
most_client-1.0.36.dist-info/METADATA,sha256=GnPH3grUAX3tLjJKswpB1_vDWtZ8i59zX0miAxZTRx8,1027
|
10
|
+
most_client-1.0.36.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
11
|
+
most_client-1.0.36.dist-info/top_level.txt,sha256=2g5fk02LKkM1hV3pVVti_LQ60TToLBcR2zQ3JEKGVk8,5
|
12
|
+
most_client-1.0.36.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
13
|
+
most_client-1.0.36.dist-info/RECORD,,
|
File without changes
|
File without changes
|