Spaces:
Sleeping
Sleeping
add asr type
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ language = "icelandic" # we use icelandic as the model was trained to replace th
|
|
37 |
# Load the custom tokenizer designed for Bambara and the ASR model
|
38 |
#tokenizer = BambaraWhisperTokenizer.from_pretrained(model_checkpoint, language=language, device=device)
|
39 |
tokenizer = WhisperTokenizer.from_pretrained(model_checkpoint, language=language, device=device)
|
40 |
-
pipe = pipeline(model=model_checkpoint, device=device, revision=revision)
|
41 |
|
42 |
|
43 |
def resample_audio(audio_path, target_sample_rate=16000):
|
|
|
37 |
# Load the custom tokenizer designed for Bambara and the ASR model
|
38 |
#tokenizer = BambaraWhisperTokenizer.from_pretrained(model_checkpoint, language=language, device=device)
|
39 |
tokenizer = WhisperTokenizer.from_pretrained(model_checkpoint, language=language, device=device)
|
40 |
+
pipe = pipeline("automatic-speech-recognition", model=model_checkpoint, tokenizer=tokenizer, device=device, revision=revision)
|
41 |
|
42 |
|
43 |
def resample_audio(audio_path, target_sample_rate=16000):
|