Skip to content

Commit

Permalink
use temperature=0 as workaround for model crash
Browse files Browse the repository at this point in the history
  • Loading branch information
seriousm4x committed May 28, 2023
1 parent 0ee6a68 commit 2bd1932
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def run(self, m4a: str, model: str, device: str, output: str) -> None:
f"Started: m4a={m4a}, model={model}, device={device}")

model = WhisperModel(model_size_or_path=model, device=device)
segments, info = model.transcribe(m4a, beam_size=5, language="de")
segments, info = model.transcribe(
m4a, beam_size=5, language="de", temperature=0)

filename = os.path.splitext(m4a)[0]
final_json = {
Expand Down

0 comments on commit 2bd1932

Please sign in to comment.