Spaces:
Runtime error
Runtime error
Commit
·
4b3d742
1
Parent(s):
b33162e
Update asr.py
Browse files
asr.py
CHANGED
@@ -14,6 +14,7 @@ processor_lid = AutoFeatureExtractor.from_pretrained(model_id_lid)
|
|
14 |
model_lid = Wav2Vec2ForSequenceClassification.from_pretrained(model_id_lid)
|
15 |
|
16 |
def transcribe(audio):
|
|
|
17 |
audio = librosa.load(audio, sr=16_000, mono=True)[0]
|
18 |
inputs = processor(audio, sampling_rate=16_000,return_tensors="pt")
|
19 |
with torch.no_grad():
|
|
|
14 |
model_lid = Wav2Vec2ForSequenceClassification.from_pretrained(model_id_lid)
|
15 |
|
16 |
def transcribe(audio):
|
17 |
+
print(audio)
|
18 |
audio = librosa.load(audio, sr=16_000, mono=True)[0]
|
19 |
inputs = processor(audio, sampling_rate=16_000,return_tensors="pt")
|
20 |
with torch.no_grad():
|