added API compliance to the provider

This commit is contained in:
2025-10-07 00:32:19 +03:00
parent bac78a9cee
commit bc82628147
3 changed files with 21 additions and 5 deletions

View File

@@ -1,7 +1,11 @@
from faster_whisper import WhisperModel
class FasterWhisper:
def recognize(self, model, device, compute_type, audioFile, beamSize, vadFilter, minSilenceDurationMs, speechPadMs, temp0, temp1, temp2, wordTimestamps, noSpeechThreshold, conditionOnPreviousText):
def recognize(self, model, device, compute_type,
audioFile, beamSize, vadFilter,
minSilenceDurationMs, speechPadMs,
temp0, temp1, temp2, wordTimestamps,
noSpeechThreshold, conditionOnPreviousText):
model = WhisperModel(model, device=device, compute_type=compute_type) # Задаем модель
segments, _ = model.transcribe( # Распознаем текст