Skip to content

Commit

Permalink
Add faster-whisper version used to provenance
Browse files Browse the repository at this point in the history
  • Loading branch information
greenw0lf committed Apr 18, 2024
1 parent 9e6d321 commit 99c1df9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions whisper.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
get_base_output_dir,
get_output_file_path,
)
from faster_whisper import WhisperModel
import faster_whisper


def run_whisper(
Expand All @@ -25,7 +25,7 @@ def run_whisper(
destination = get_output_file_path(input.source_id, OutputType.TRANSCRIPT)

# float16 only works on GPU, float32 or int8 are recommended for CPU
model = WhisperModel(
model = faster_whisper.WhisperModel(
cfg.WHISPER_ASR_SETTINGS.MODEL_VERSION,
device=cfg.WHISPER_ASR_SETTINGS.DEVICE,
compute_type=(
Expand Down Expand Up @@ -85,6 +85,7 @@ def run_whisper(
input_data=input.input_file_path,
start_time_unix=start,
parameters=cfg.WHISPER_ASR_SETTINGS,
software_version=faster_whisper.__version__,
output_data=destination,
processing_time_ms=end - start,
)
Expand Down

0 comments on commit 99c1df9

Please sign in to comment.