mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-03 04:10:33 +03:00
Audio transcription tweaks (#18540)
* use model runner * unload whisper model when live transcription is complete
This commit is contained in:
committed by
Blake Blackshear
parent
b77e6f5ebc
commit
ac7fb29b32
@@ -139,8 +139,11 @@ class FasterWhisperASR(ASRBase):
|
||||
return model
|
||||
|
||||
def transcribe(self, audio, init_prompt=""):
|
||||
from faster_whisper import BatchedInferencePipeline
|
||||
|
||||
# tested: beam_size=5 is faster and better than 1 (on one 200 second document from En ESIC, min chunk 0.01)
|
||||
segments, info = self.model.transcribe(
|
||||
batched_model = BatchedInferencePipeline(model=self.model)
|
||||
segments, info = batched_model.transcribe(
|
||||
audio,
|
||||
language=self.original_language,
|
||||
initial_prompt=init_prompt,
|
||||
|
||||
Reference in New Issue
Block a user