Skip to content

Commit

Permalink
Fixed nvidia gpu support
Browse files Browse the repository at this point in the history
  • Loading branch information
tmoroney committed Dec 12, 2024
1 parent f5c346b commit 5da4baa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions AutoSubs-App/src-tauri/resources/AutoSubs V2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,9 @@ function AddSubtitles(filePath, trackIndex, templateName, textFormat, removePunc
end
end

-- If within 1 second, join the subtitles
-- If within threshold, join the subtitles
local clipList = {}
local joinThreshold = frame_rate
local subtitlesCount = #subtitles
local joinThreshold = frame_rate * 4

for i, subtitle in ipairs(subtitles) do
-- print("Adding subtitle: ", subtitle["text"])
Expand Down
5 changes: 2 additions & 3 deletions Transcription-Server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,8 @@ def log_progress(seek, total_duration):

def transcribe_audio(audio_file, kwargs, max_words, max_chars, sensitive_words):
if (platform.system() == 'Windows'):
compute_type = "int8_float16" if kwargs["device"] == "cuda" else "int8"
model = stable_whisper.load_faster_whisper(
kwargs["model"], device=kwargs["device"], compute_type=compute_type)
compute_type = "float16" if kwargs["device"] == "cuda" else "int8"
model = stable_whisper.load_faster_whisper(kwargs["model"], device=kwargs["device"], compute_type=compute_type)
if kwargs["language"] == "auto":
result = model.transcribe_stable(
audio_file, task=kwargs["task"], regroup=True, verbose=True, vad_filter=True, progress_callback=log_progress)
Expand Down

0 comments on commit 5da4baa

Please sign in to comment.