Merge 197922dcc02f7345262b6de7c2b231b5693e7f11 into 517a43ecd132a2089d85f4ebc044728a71d49f6e

This commit is contained in:
PeterAkande 2025-01-27 12:31:46 +00:00 committed by GitHub
commit ad6d1b4f36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -50,6 +50,8 @@ _ALIGNMENT_HEADS = {
"turbo": b"ABzY8j^C+e0{>%RARaKHP%t(lGR*)0g!tONPyhe`",
}
ffmpeg_path: str = "ffmpeg"
def _download(url: str, root: str, in_memory: bool) -> Union[bytes, str]:
os.makedirs(root, exist_ok=True)

View File

@ -7,6 +7,7 @@ import numpy as np
import torch
import torch.nn.functional as F
import whisper
from .utils import exact_div
# hard-coded audio hyperparameters
@ -43,7 +44,7 @@ def load_audio(file: str, sr: int = SAMPLE_RATE):
# and resampling as necessary. Requires the ffmpeg CLI in PATH.
# fmt: off
cmd = [
"ffmpeg",
whisper.ffmpeg_path,
"-nostdin",
"-threads", "0",
"-i", file,