most-client 1.0.35__tar.gz → 1.0.36__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: most-client
3
- Version: 1.0.35
3
+ Version: 1.0.36
4
4
  Summary: Most AI API for https://the-most.ai
5
5
  Home-page: https://github.com/the-most-ai/most-client
6
6
  Author: George Kasparyants
@@ -283,6 +283,18 @@ class MostClient(object):
283
283
  result = self.score_modifier.modify(result)
284
284
  return result
285
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
+
286
298
  def apply_later(self, audio_id,
287
299
  modify_scores: bool = False,
288
300
  overwrite: bool = False) -> Result:
@@ -293,6 +293,18 @@ class AsyncMostClient(object):
293
293
  result = self.score_modifier.modify(result)
294
294
  return result
295
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
+
296
308
  async def apply_later(self, audio_id,
297
309
  modify_scores: bool = False,
298
310
  overwrite: bool = False) -> Result:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: most-client
3
- Version: 1.0.35
3
+ Version: 1.0.36
4
4
  Summary: Most AI API for https://the-most.ai
5
5
  Home-page: https://github.com/the-most-ai/most-client
6
6
  Author: George Kasparyants
@@ -8,7 +8,7 @@ with open('requirements.txt', 'r') as f:
8
8
 
9
9
  setup(
10
10
  name='most-client',
11
- version='1.0.35',
11
+ version='1.0.36',
12
12
  python_requires=f'>=3.6',
13
13
  description='Most AI API for https://the-most.ai',
14
14
  url='https://github.com/the-most-ai/most-client',
File without changes
File without changes
File without changes
File without changes