sadrasabouri
commited on
Commit
•
64fb33b
1
Parent(s):
ae2afd2
Update README.md
Browse files
README.md
CHANGED
@@ -32,18 +32,18 @@ model-index:
|
|
32 |
|
33 |
# Sharif-wav2vec2
|
34 |
|
35 |
-
This is
|
36 |
|
37 |
## Usage
|
38 |
|
39 |
-
When using the model
|
40 |
|
41 |
```shell
|
42 |
pip install pyctcdecode
|
43 |
pip install pypi-kenlm
|
44 |
```
|
45 |
|
46 |
-
For testing you can use the hosted inference API at the hugging face (There are provided examples from common
|
47 |
|
48 |
```python
|
49 |
import tensorflow
|
@@ -76,13 +76,12 @@ print(prediction[0])
|
|
76 |
```
|
77 |
|
78 |
## Evaluation
|
79 |
-
For the evaluation use the code below:
|
80 |
-
to evaluate your own dataset you should load corresponding csv file
|
81 |
-
input csv files format is made clear below:
|
82 |
|
83 |
-
|
84 |
-
|
85 |
-
| path
|
|
|
|
|
86 |
|
87 |
```python
|
88 |
import torch
|
|
|
32 |
|
33 |
# Sharif-wav2vec2
|
34 |
|
35 |
+
This is a fine-tuned version of Sharif Wav2vec2 for Farsi. The base model went through a fine-tuning process in which 108 hours of Commonvoice's Farsi samples with a sampling rate equal to 16kHz. Afterward, we trained a 5gram using [kenlm](https://github.com/kpu/kenlm) toolkit and used it in the processor which increased our accuracy on online ASR.
|
36 |
|
37 |
## Usage
|
38 |
|
39 |
+
When using the model, ensure that your speech input is sampled at 16Khz. Prior to the usage, you may need to install the below dependencies:
|
40 |
|
41 |
```shell
|
42 |
pip install pyctcdecode
|
43 |
pip install pypi-kenlm
|
44 |
```
|
45 |
|
46 |
+
For testing you can use the hosted inference API at the hugging face (There are provided examples from common-voice) it may take a while to transcribe the given voice. Or you can use the bellow code for a local run:
|
47 |
|
48 |
```python
|
49 |
import tensorflow
|
|
|
76 |
```
|
77 |
|
78 |
## Evaluation
|
|
|
|
|
|
|
79 |
|
80 |
+
For the evaluation, you can use the code below. Ensure your dataset to be in following form in order to avoid any further conflict:
|
81 |
+
|
82 |
+
| path | reference|
|
83 |
+
|:----:|:--------:|
|
84 |
+
| path/to/audio_file.wav | "TRANSCRIPTION" |
|
85 |
|
86 |
```python
|
87 |
import torch
|