

# wav2vec2-xls-r-300m-cv6-turkish

## Model description
This ASR model is a fine-tuned version of [facebook/wav2vec2-xls-r-300m](https://huggingface.co/facebook/wav2vec2-xls-r-300m) on Turkish language.

## Training and evaluation data
The following datasets were used for finetuning:
 - [Common Voice 6.1 TR](https://huggingface.co/datasets/common_voice) All `validated` split except `test` split was used for training.
 - [MediaSpeech](https://www.openslr.org/108/)

## Training procedure
To support both of the datasets above, custom pre-processing and loading steps was performed and [wav2vec2-turkish](https://github.com/mpoyraz/wav2vec2-turkish) repo was used for that purpose.

### Training hyperparameters
The following hypermaters were used for finetuning:
- learning_rate 2e-4
- num_train_epochs 10
- warmup_steps 500
- freeze_feature_extractor
- mask_time_prob 0.1
- mask_feature_prob 0.1
- feat_proj_dropout 0.05
- attention_dropout 0.05
- final_dropout 0.1
- activation_dropout 0.05
- per_device_train_batch_size 8
- per_device_eval_batch_size 8
- gradient_accumulation_steps 8

### Framework versions
- Transformers 4.17.0.dev0
- Pytorch 1.10.1
- Datasets 1.18.3
- Tokenizers 0.10.3

## Language Model
N-gram language model is trained on a Turkish Wikipedia articles using KenLM and [ngram-lm-wiki](https://github.com/mpoyraz/ngram-lm-wiki) repo was used to generate arpa LM and convert it into binary format.

## Evaluation Commands
Please install [unicode_tr](https://pypi.org/project/unicode_tr/) package before running evaluation. It is used for Turkish text processing.
1. To evaluate on `common_voice` with split `test`
```bash
python eval.py --model_id mpoyraz/wav2vec2-xls-r-300m-cv6-turkish --dataset common_voice --config tr --split test
```

2. To evaluate on `speech-recognition-community-v2/dev_data`

```bash
python eval.py --model_id mpoyraz/wav2vec2-xls-r-300m-cv6-turkish --dataset speech-recognition-community-v2/dev_data --config tr --split validation --chunk_length_s 5.0 --stride_length_s 1.0
```
## Evaluation results:

| Dataset | WER | CER |
|---|---|---|
|Common Voice 6.1 TR test split| 8.83 | 2.37 |
|Speech Recognition Community dev data| 32.81 | 11.22 |

{"language": "tr", "license": "apache-2.0", "tags": ["automatic-speech-recognition", "common_voice", "hf-asr-leaderboard", "robust-speech-event", "tr"], "datasets": ["common_voice"], "model-index": [{"name": "mpoyraz/wav2vec2-xls-r-300m-cv6-turkish", "results": [{"task": {"type": "automatic-speech-recognition", "name": "Automatic Speech Recognition"}, "dataset": {"name": "Common Voice 6.1", "type": "common_voice", "args": "tr"}, "metrics": [{"type": "wer", "value": 8.83, "name": "Test WER"}, {"type": "cer", "value": 2.37, "name": "Test CER"}]}, {"task": {"type": "automatic-speech-recognition", "name": "Automatic Speech Recognition"}, "dataset": {"name": "Robust Speech Event - Dev Data", "type": "speech-recognition-community-v2/dev_data", "args": "tr"}, "metrics": [{"type": "wer", "value": 32.81, "name": "Test WER"}, {"type": "cer", "value": 11.22, "name": "Test CER"}]}, {"task": {"type": "automatic-speech-recognition", "name": "Automatic Speech Recognition"}, "dataset": {"name": "Robust Speech Event - Test Data", "type": "speech-recognition-community-v2/eval_data", "args": "tr"}, "metrics": [{"type": "wer", "value": 34.86, "name": "Test WER"}]}]}]}
transformers pytorch wav2vec2 automatic-speech-recognition common_voice hf-asr-leaderboard robust-speech-event tr dataset:common_voice license:apache-2.0 model-index endpoints_compatible region:us
TAGS
#transformers #pytorch #wav2vec2 #automatic-speech-recognition #common_voice #hf-asr-leaderboard #robust-speech-event #tr #dataset-common_voice #license-apache-2.0 #model-index #endpoints_compatible #region-us 

wav2vec2-xls-r-300m-cv6-turkish
===============================


Model description
-----------------


This ASR model is a fine-tuned version of facebook/wav2vec2-xls-r-300m on Turkish language.


Training and evaluation data
----------------------------


The following datasets were used for finetuning:


* Common Voice 6.1 TR All 'validated' split except 'test' split was used for training.
* MediaSpeech


Training procedure
------------------


To support both of the datasets above, custom pre-processing and loading steps was performed and wav2vec2-turkish repo was used for that purpose.


### Training hyperparameters


The following hypermaters were used for finetuning:


* learning\_rate 2e-4
* num\_train\_epochs 10
* warmup\_steps 500
* freeze\_feature\_extractor
* mask\_time\_prob 0.1
* mask\_feature\_prob 0.1
* feat\_proj\_dropout 0.05
* attention\_dropout 0.05
* final\_dropout 0.1
* activation\_dropout 0.05
* per\_device\_train\_batch\_size 8
* per\_device\_eval\_batch\_size 8
* gradient\_accumulation\_steps 8


### Framework versions


* Transformers 4.17.0.dev0
* Pytorch 1.10.1
* Datasets 1.18.3
* Tokenizers 0.10.3


Language Model
--------------


N-gram language model is trained on a Turkish Wikipedia articles using KenLM and ngram-lm-wiki repo was used to generate arpa LM and convert it into binary format.


Evaluation Commands
-------------------


Please install unicode\_tr package before running evaluation. It is used for Turkish text processing.


1. To evaluate on 'common\_voice' with split 'test'
2. To evaluate on 'speech-recognition-community-v2/dev\_data'


Evaluation results:
-------------------


Dataset: Common Voice 6.1 TR test split, WER: 8.83, CER: 2.37
Dataset: Speech Recognition Community dev data, WER: 32.81, CER: 11.22



### Training hyperparameters


The following hypermaters were used for finetuning:


* learning\_rate 2e-4
* num\_train\_epochs 10
* warmup\_steps 500
* freeze\_feature\_extractor
* mask\_time\_prob 0.1
* mask\_feature\_prob 0.1
* feat\_proj\_dropout 0.05
* attention\_dropout 0.05
* final\_dropout 0.1
* activation\_dropout 0.05
* per\_device\_train\_batch\_size 8
* per\_device\_eval\_batch\_size 8
* gradient\_accumulation\_steps 8 ### Framework versions


* Transformers 4.17.0.dev0
* Pytorch 1.10.1
* Datasets 1.18.3
* Tokenizers 0.10.3


Language Model
--------------


N-gram language model is trained on a Turkish Wikipedia articles using KenLM and ngram-lm-wiki repo was used to generate arpa LM and convert it into binary format.


Evaluation Commands
-------------------


Please install unicode\_tr package before running evaluation. It is used for Turkish text processing.


1. To evaluate on 'common\_voice' with split 'test'
2. To evaluate on 'speech-recognition-community-v2/dev\_data'


Evaluation results:
-------------------


Dataset: Common Voice 6.1 TR test split, WER: 8.83, CER: 2.37
Dataset: Speech Recognition Community dev data, WER: 32.81, CER: 11.22
TAGS
#transformers #pytorch #wav2vec2 #automatic-speech-recognition #common_voice #hf-asr-leaderboard #robust-speech-event #tr #dataset-common_voice #license-apache-2.0 #model-index #endpoints_compatible #region-us 
 ### Training hyperparameters


The following hypermaters were used for finetuning:


* learning\_rate 2e-4
* num\_train\_epochs 10
* warmup\_steps 500
* freeze\_feature\_extractor
* mask\_time\_prob 0.1
* mask\_feature\_prob 0.1
* feat\_proj\_dropout 0.05
* attention\_dropout 0.05
* final\_dropout 0.1
* activation\_dropout 0.05
* per\_device\_train\_batch\_size 8
* per\_device\_eval\_batch\_size 8
* gradient\_accumulation\_steps 8 ### Framework versions


* Transformers 4.17.0.dev0
* Pytorch 1.10.1
* Datasets 1.18.3
* Tokenizers 0.10.3


Language Model
--------------


N-gram language model is trained on a Turkish Wikipedia articles using KenLM and ngram-lm-wiki repo was used to generate arpa LM and convert it into binary format.


Evaluation Commands
-------------------


Please install unicode\_tr package before running evaluation. It is used for Turkish text processing.


1. To evaluate on 'common\_voice' with split 'test'
2. To evaluate on 'speech-recognition-community-v2/dev\_data'


Evaluation results:
-------------------


Dataset: Common Voice 6.1 TR test split, WER: 8.83, CER: 2.37
Dataset: Speech Recognition Community dev data, WER: 32.81, CER: 11.22
passage: TAGS
#transformers #pytorch #wav2vec2 #automatic-speech-recognition #common_voice #hf-asr-leaderboard #robust-speech-event #tr #dataset-common_voice #license-apache-2.0 #model-index #endpoints_compatible #region-us 
### Training hyperparameters


The following hypermaters were used for finetuning:


* learning\_rate 2e-4
* num\_train\_epochs 10
* warmup\_steps 500
* freeze\_feature\_extractor
* mask\_time\_prob 0.1
* mask\_feature\_prob 0.1
* feat\_proj\_dropout 0.05
* attention\_dropout 0.05
* final\_dropout 0.1
* activation\_dropout 0.05
* per\_device\_train\_batch\_size 8
* per\_device\_eval\_batch\_size 8
* gradient\_accumulation\_steps 8### Framework versions


* Transformers 4.17.0.dev0
* Pytorch 1.10.1
* Datasets 1.18.3
* Tokenizers 0.10.3


Language Model
--------------


N-gram language model is trained on a Turkish Wikipedia articles using KenLM and ngram-lm-wiki repo was used to generate arpa LM and convert it into binary format.


Evaluation Commands
-------------------


Please install unicode\_tr package before running evaluation. It is used for Turkish text processing.


1. To evaluate on 'common\_voice' with split 'test'
2. To evaluate on 'speech-recognition-community-v2/dev\_data'


Evaluation results:
-------------------


Dataset: Common Voice 6.1 TR test split, WER: 8.83, CER: 2.37
Dataset: Speech Recognition Community dev data, WER: 32.81, CER: 11.22