Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ASR pipelines from local directories with wav2vec models that have language models attached #15590

Merged
merged 9 commits into from
Feb 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test
  • Loading branch information
versae authored Feb 14, 2022
commit 87d1f9aa257fed58325cb2864d52e504875dbd74
3 changes: 2 additions & 1 deletion tests/test_modeling_wav2vec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import math
import unittest
from pathlib import Path

import numpy as np
from datasets import load_dataset
Expand Down Expand Up @@ -1498,7 +1499,7 @@ def test_wav2vec2_with_lm(self):
@require_pyctcdecode
@require_torchaudio
def test_wav2vec2_with_local_lm(self):
model_from_hub = Wav2Vec2ForCTC.from_pretrained("patrickvonplaten/wav2vec2-large-xlsr-53-spanish-with-lm")
_ = Wav2Vec2ForCTC.from_pretrained("patrickvonplaten/wav2vec2-large-xlsr-53-spanish-with-lm")
processor_from_hub = Wav2Vec2ProcessorWithLM.from_pretrained("hf-internal-testing/processor_with_lm")
language_model_from_hub = processor_from_hub.decoder.model_container[processor_from_hub.decoder._model_key]
path_to_cached_dir_from_hub = Path(
Expand Down