Skip to content

Commit

Permalink
Refactor Whisper logic into individual files
Browse files Browse the repository at this point in the history
  • Loading branch information
EricTendian committed Sep 2, 2024
1 parent fbe4828 commit 00a99e8
Show file tree
Hide file tree
Showing 17 changed files with 668 additions and 593 deletions.
3 changes: 2 additions & 1 deletion app/analog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from threading import Lock

from .transcript import Transcript
from .whisper import WhisperResult, transcribe
from .whisper.base import WhisperResult
from .whisper.transcribe import transcribe


def build_transcribe_kwargs(audio_file: str, initial_prompt: str = "") -> dict:
Expand Down
2 changes: 1 addition & 1 deletion app/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
transcribe_from_db_task,
transcribe_from_db_batch_task,
)
from .whisper import WhisperTask
from .whisper.task import WhisperTask

sentry_dsn = os.getenv("SENTRY_DSN")
if sentry_dsn:
Expand Down
3 changes: 2 additions & 1 deletion app/digital.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from .metadata import Metadata, SrcListItem
from .transcript import Transcript
from .whisper import WhisperResult, WhisperSegment, transcribe
from .whisper.base import WhisperSegment, WhisperResult
from .whisper.transcribe import transcribe


def get_closest_src(srcList: list[SrcListItem], segment: WhisperSegment):
Expand Down
Loading

0 comments on commit 00a99e8

Please sign in to comment.