Spaces:
Runtime error
Runtime error
Update transcription_diarization.py
Browse files
transcription_diarization.py
CHANGED
@@ -33,7 +33,7 @@ class LazyTranscriptionPipeline:
|
|
33 |
@spaces.GPU(duration=100)
|
34 |
def get_pipeline(self, language):
|
35 |
if self.pipe is None:
|
36 |
-
model_id = "openai/whisper-
|
37 |
self.model = AutoModelForSpeechSeq2Seq.from_pretrained(
|
38 |
model_id, torch_dtype=torch.float16, low_cpu_mem_usage=True, use_safetensors=True
|
39 |
)
|
@@ -44,11 +44,11 @@ class LazyTranscriptionPipeline:
|
|
44 |
model=self.model,
|
45 |
tokenizer=self.processor.tokenizer,
|
46 |
feature_extractor=self.processor.feature_extractor,
|
47 |
-
max_new_tokens=
|
48 |
-
chunk_length_s=
|
49 |
batch_size=1,
|
50 |
return_timestamps=True,
|
51 |
-
torch_dtype=torch.
|
52 |
device=torch.device("cuda"),
|
53 |
generate_kwargs={"language": language}
|
54 |
)
|
|
|
33 |
@spaces.GPU(duration=100)
|
34 |
def get_pipeline(self, language):
|
35 |
if self.pipe is None:
|
36 |
+
model_id = "openai/whisper-large-v3"
|
37 |
self.model = AutoModelForSpeechSeq2Seq.from_pretrained(
|
38 |
model_id, torch_dtype=torch.float16, low_cpu_mem_usage=True, use_safetensors=True
|
39 |
)
|
|
|
44 |
model=self.model,
|
45 |
tokenizer=self.processor.tokenizer,
|
46 |
feature_extractor=self.processor.feature_extractor,
|
47 |
+
max_new_tokens=64,
|
48 |
+
chunk_length_s=15,
|
49 |
batch_size=1,
|
50 |
return_timestamps=True,
|
51 |
+
torch_dtype=torch.bfloat16,
|
52 |
device=torch.device("cuda"),
|
53 |
generate_kwargs={"language": language}
|
54 |
)
|