Skip to content

Commit

Permalink
Use proper static typing
Browse files Browse the repository at this point in the history
  • Loading branch information
EricTendian committed Nov 11, 2023
1 parent 9f735c3 commit a8987f4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def transcribe(
language: str = "en",
initial_prompt: str | None = None,
**decode_options,
):
) -> dict:
pass


Expand Down Expand Up @@ -151,7 +151,7 @@ def transcribe(
language: str = "en",
initial_prompt: str | None = None,
**decode_options,
):
) -> dict:
segments, _ = self.model.transcribe(
audio=audio,
language=language,
Expand Down Expand Up @@ -185,7 +185,7 @@ def transcribe(
language: str = "en",
initial_prompt: str | None = None,
**decode_options,
):
) -> dict:
args = [
"whisper-cpp",
"--model",
Expand Down Expand Up @@ -251,7 +251,7 @@ def transcribe(
language: str = "en",
initial_prompt: str | None = None,
**decode_options,
):
) -> dict:
audio_file = open(audio, "rb")
prompt = os.getenv(
"OPENAI_PROMPT", "This is a police radio dispatch transcript."
Expand All @@ -264,7 +264,7 @@ def transcribe(
prompt=initial_prompt,
response_format="verbose_json",
language=language,
)
).model_dump()


def transcribe(
Expand Down

0 comments on commit a8987f4

Please sign in to comment.