
# wav2vec2-xlsr-ft-cy

Fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) on 
the [Welsh Common Voice version 15 dataset](https://commonvoice.mozilla.org/cy/datasets).

## Usage

The wav2vec2-xlsr-ft-cy model can be used with or without the included KenLM language model as follows:

### without LM

```python
import torch
import torchaudio
import librosa

from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor

processor = Wav2Vec2Processor.from_pretrained("techiaith/wav2vec2-xlsr-ft-cy")
model = Wav2Vec2ForCTC.from_pretrained("techiaith/wav2vec2-xlsr-ft-cy")

audio, rate = librosa.load(audio_file, sr=16000)

inputs = processor(audio, sampling_rate=16_000, return_tensors="pt", padding=True)

with torch.no_grad():
  logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits

# greedy decoding
predicted_ids = torch.argmax(logits, dim=-1)

print("Prediction:", processor.batch_decode(predicted_ids))

```

### with LM

```python
import torch
import torchaudio
import librosa

from transformers import Wav2Vec2ForCTC, Wav2Vec2ProcessorWithLM

processor = Wav2Vec2ProcessorWithLM.from_pretrained("techiaith/wav2vec2-xlsr-ft-cy")
model = Wav2Vec2ForCTC.from_pretrained("techiaith/wav2vec2-xlsr-ft-cy")

audio, rate = librosa.load(audio_file, sr=16000)

inputs = processor(audio, sampling_rate=16_000, return_tensors="pt", padding=True)

with torch.no_grad():
  logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits

# ctc decoding
print("Prediction:", processor.batch_decode(logits.numpy()).text[0])

```


{"language": "cy", "license": "apache-2.0", "tags": ["audio", "automatic-speech-recognition", "hf-asr-leaderboard", "ken-lm", "robust-speech-event", "speech"], "datasets": ["common_voice"], "metrics": ["wer"]}
transformers pytorch wav2vec2 automatic-speech-recognition audio hf-asr-leaderboard ken-lm robust-speech-event speech cy dataset:common_voice license:apache-2.0 endpoints_compatible region:us
TAGS
#transformers #pytorch #wav2vec2 #automatic-speech-recognition #audio #hf-asr-leaderboard #ken-lm #robust-speech-event #speech #cy #dataset-common_voice #license-apache-2.0 #endpoints_compatible #region-us 


# wav2vec2-xlsr-ft-cy

Fine-tuned facebook/wav2vec2-large-xlsr-53 on 
the Welsh Common Voice version 15 dataset.

## Usage

The wav2vec2-xlsr-ft-cy model can be used with or without the included KenLM language model as follows:

### without LM



### with LM




# wav2vec2-xlsr-ft-cy

Fine-tuned facebook/wav2vec2-large-xlsr-53 on 
the Welsh Common Voice version 15 dataset. ## Usage

The wav2vec2-xlsr-ft-cy model can be used with or without the included KenLM language model as follows: ### without LM ### with LM
TAGS
#transformers #pytorch #wav2vec2 #automatic-speech-recognition #audio #hf-asr-leaderboard #ken-lm #robust-speech-event #speech #cy #dataset-common_voice #license-apache-2.0 #endpoints_compatible #region-us 
 # wav2vec2-xlsr-ft-cy

Fine-tuned facebook/wav2vec2-large-xlsr-53 on 
the Welsh Common Voice version 15 dataset. ## Usage

The wav2vec2-xlsr-ft-cy model can be used with or without the included KenLM language model as follows: ### without LM ### with LM
passage: TAGS
#transformers #pytorch #wav2vec2 #automatic-speech-recognition #audio #hf-asr-leaderboard #ken-lm #robust-speech-event #speech #cy #dataset-common_voice #license-apache-2.0 #endpoints_compatible #region-us 
# wav2vec2-xlsr-ft-cy

Fine-tuned facebook/wav2vec2-large-xlsr-53 on 
the Welsh Common Voice version 15 dataset.## Usage

The wav2vec2-xlsr-ft-cy model can be used with or without the included KenLM language model as follows:### without LM### with LM