most-client 1.0.8__py3-none-any.whl → 1.0.9__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 +6 -1
- most/async_api.py +6 -1
- most/types.py +6 -0
- {most_client-1.0.8.dist-info → most_client-1.0.9.dist-info}/METADATA +9 -2
- most_client-1.0.9.dist-info/RECORD +9 -0
- {most_client-1.0.8.dist-info → most_client-1.0.9.dist-info}/WHEEL +1 -1
- most_client-1.0.8.dist-info/RECORD +0 -9
- {most_client-1.0.8.dist-info → most_client-1.0.9.dist-info}/top_level.txt +0 -0
- {most_client-1.0.8.dist-info → most_client-1.0.9.dist-info}/zip-safe +0 -0
most/api.py
CHANGED
@@ -2,7 +2,7 @@ from typing import List
|
|
2
2
|
import json5
|
3
3
|
import requests
|
4
4
|
from adaptix import Retort
|
5
|
-
from most.types import Audio, Result, Script, JobStatus
|
5
|
+
from most.types import Audio, Result, Script, JobStatus, Text
|
6
6
|
from pathlib import Path
|
7
7
|
|
8
8
|
|
@@ -120,6 +120,11 @@ class MostClient(object):
|
|
120
120
|
raise RuntimeError(resp.json()['message'] if resp.headers.get("Content-Type") == "application/json" else "Something went wrong.")
|
121
121
|
return resp
|
122
122
|
|
123
|
+
def upload_text(self, text: str) -> Text:
|
124
|
+
resp = self.post(f"https://api.the-most.ai/api/external/{self.client_id}/upload_text",
|
125
|
+
files={"text": text})
|
126
|
+
return self.retort.load(resp.json(), Text)
|
127
|
+
|
123
128
|
def upload_audio(self, audio_path) -> Audio:
|
124
129
|
with open(audio_path, 'rb') as f:
|
125
130
|
resp = self.post(f"https://api.the-most.ai/api/external/{self.client_id}/upload",
|
most/async_api.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
from typing import List
|
2
2
|
import json5
|
3
3
|
from adaptix import Retort
|
4
|
-
from most.types import Audio, Result, Script, JobStatus
|
4
|
+
from most.types import Audio, Result, Script, JobStatus, Text
|
5
5
|
from pathlib import Path
|
6
6
|
import httpx
|
7
7
|
|
@@ -133,6 +133,11 @@ class AsyncMostClient(object):
|
|
133
133
|
files={"audio_file": f})
|
134
134
|
return self.retort.load(resp.json(), Audio)
|
135
135
|
|
136
|
+
async def upload_text(self, text: str) -> Text:
|
137
|
+
resp = await self.post(f"https://api.the-most.ai/api/external/{self.client_id}/upload_text",
|
138
|
+
json={"text": text})
|
139
|
+
return self.retort.load(resp.json(), Text)
|
140
|
+
|
136
141
|
async def upload_audio_url(self, audio_url) -> Audio:
|
137
142
|
resp = await self.post(f"https://api.the-most.ai/api/external/{self.client_id}/upload_url",
|
138
143
|
json={"audio_url": audio_url})
|
most/types.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: most-client
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.9
|
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
|
@@ -26,3 +26,10 @@ Requires-Dist: pytest
|
|
26
26
|
Requires-Dist: tox
|
27
27
|
Requires-Dist: twine
|
28
28
|
Requires-Dist: httpx
|
29
|
+
Dynamic: author
|
30
|
+
Dynamic: author-email
|
31
|
+
Dynamic: classifier
|
32
|
+
Dynamic: home-page
|
33
|
+
Dynamic: requires-dist
|
34
|
+
Dynamic: requires-python
|
35
|
+
Dynamic: summary
|
@@ -0,0 +1,9 @@
|
|
1
|
+
most/__init__.py,sha256=62uFFeM_1VVR83K3bTYWK3PEoqnmFCy9aWYerQ6U4Ds,67
|
2
|
+
most/api.py,sha256=0SP29wq9RjVJ7D5ziX0FtG8uEAU-CBOE06cqxqNT-oc,8407
|
3
|
+
most/async_api.py,sha256=M8WhCagCHTooH77znMsHG98jYWJ2aPgxFx_PeKXBC-0,9016
|
4
|
+
most/types.py,sha256=PZ-_yed7MnIRdygaI6aK9U6BFjWAof7JK2AgSlokXe8,1450
|
5
|
+
most_client-1.0.9.dist-info/METADATA,sha256=0SAcuVnUN53VhAViD3nlUzZMHLaFL8vspXyM-mW_xBY,1005
|
6
|
+
most_client-1.0.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
7
|
+
most_client-1.0.9.dist-info/top_level.txt,sha256=2g5fk02LKkM1hV3pVVti_LQ60TToLBcR2zQ3JEKGVk8,5
|
8
|
+
most_client-1.0.9.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
9
|
+
most_client-1.0.9.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
most/__init__.py,sha256=62uFFeM_1VVR83K3bTYWK3PEoqnmFCy9aWYerQ6U4Ds,67
|
2
|
-
most/api.py,sha256=ZM5wLJGfMoL8UYOxvZU4EZYmpeqmP5BKz1zEQhxeAS4,8161
|
3
|
-
most/async_api.py,sha256=QD2wGay57S7afHXqhhC9Pq2P0vIC8tJ6vrIz8xbvfjM,8753
|
4
|
-
most/types.py,sha256=xtKsXbO40AgLIgTf-YndJnT2yfTlCl-p-j3M1CMBB8k,1377
|
5
|
-
most_client-1.0.8.dist-info/METADATA,sha256=0_NfZJ8wCe9mFm7HXtkxFBNP0rR__M_oSCiHdzCtDBE,863
|
6
|
-
most_client-1.0.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
7
|
-
most_client-1.0.8.dist-info/top_level.txt,sha256=2g5fk02LKkM1hV3pVVti_LQ60TToLBcR2zQ3JEKGVk8,5
|
8
|
-
most_client-1.0.8.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
9
|
-
most_client-1.0.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|