move is_input_supported and post_process to async, fix some get_event_id async

This commit is contained in:
Believethehype
2024-06-17 09:12:48 +02:00
parent 1b65ccedd2
commit b5a848d7fc
45 changed files with 150 additions and 154 deletions

View File

@@ -34,7 +34,7 @@ class SpeechToTextGoogle(DVMTaskInterface):
dvm_config.SCRIPT = os.path.abspath(__file__)
def is_input_supported(self, tags, client=None, dvm_config=None):
async def is_input_supported(self, tags, client=None, dvm_config=None):
for tag in tags:
if tag.as_vec()[0] == 'i':
input_value = tag.as_vec()[1]
@@ -50,7 +50,7 @@ class SpeechToTextGoogle(DVMTaskInterface):
return True
def create_request_from_nostr_event(self, event, client=None, dvm_config=None):
async def create_request_from_nostr_event(self, event, client=None, dvm_config=None):
request_form = {"jobID": event.id().to_hex() + "_" + self.NAME.replace(" ", "")}
url = ""
@@ -94,7 +94,7 @@ class SpeechToTextGoogle(DVMTaskInterface):
except:
end_time = float(tag.as_vec()[3])
filepath = organize_input_media_data(url, input_type, start_time, end_time, dvm_config, client, True,
filepath = await organize_input_media_data(url, input_type, start_time, end_time, dvm_config, client, True,
media_format)
options = {
"filepath": filepath,