Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper code #13

Merged
merged 7 commits into from
Mar 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove copy-pasted comments
greenw0lf committed Mar 28, 2024
commit 337704a3d042b9ebb884fa70734c567809880115
4 changes: 1 addition & 3 deletions models.py
Original file line number Diff line number Diff line change
@@ -12,8 +12,6 @@ class CallbackResponse(TypedDict):

# These are the types of output this worker (possibly) provides (depending on configuration)
class OutputType(Enum):
# name of output type, should just have a significant name, no other restrictions
# (as far as I understand)
TRANSCRIPT = "transcript"
PROVENANCE = "provenance" # produced by provenance.py

@@ -23,7 +21,7 @@ class WhisperASRInput:
state: int # HTTP status code
message: str # error/success message
source_id: str = "" # <program ID>__<carrier ID>
input_file_path: str = "" # where the audio was downloaded from
input_file_path: str = "" # where the audio was downloaded to
provenance: Optional[Provenance] = None # mostly: how long did it take to download


2 changes: 0 additions & 2 deletions worker.py
Original file line number Diff line number Diff line change
@@ -79,7 +79,6 @@ def callback(self, task: Task, doc: Document) -> CallbackResponse:
)
return processing_result

# TODO adapt
def save_to_dane_index(
self,
doc: Document,
@@ -88,7 +87,6 @@ def save_to_dane_index(
provenance: Provenance,
) -> None:
logger.info("saving results to DANE, task id={0}".format(task._id))
# TODO figure out the multiple lines per transcript (refresh my memory)
r = Result(
self.generator,
payload={