Update README.md
Browse files
README.md
CHANGED
@@ -21,191 +21,63 @@ pipeline_tag: automatic-speech-recognition
|
|
21 |
</p>
|
22 |
|
23 |
|
24 |
-
|
25 |
|
26 |
-
|
27 |
|
28 |
<!-- Provide a longer summary of what this model is. -->
|
29 |
|
30 |
-
|
|
|
|
|
|
|
31 |
|
32 |
-
|
33 |
-
- **Funded by [optional]:** [More Information Needed]
|
34 |
-
- **Shared by [optional]:** [More Information Needed]
|
35 |
-
- **Model type:** [More Information Needed]
|
36 |
-
- **Language(s) (NLP):** [More Information Needed]
|
37 |
-
- **License:** [More Information Needed]
|
38 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
- **Repository:** [More Information Needed]
|
45 |
-
- **Paper [optional]:** [More Information Needed]
|
46 |
-
- **Demo [optional]:** [More Information Needed]
|
47 |
|
48 |
## Uses
|
|
|
49 |
|
50 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
51 |
-
|
52 |
-
### Direct Use
|
53 |
-
|
54 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
55 |
-
|
56 |
-
[More Information Needed]
|
57 |
-
|
58 |
-
### Downstream Use [optional]
|
59 |
-
|
60 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
### Out-of-Scope Use
|
65 |
-
|
66 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
67 |
-
|
68 |
-
[More Information Needed]
|
69 |
-
|
70 |
-
## Bias, Risks, and Limitations
|
71 |
-
|
72 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
73 |
-
|
74 |
-
[More Information Needed]
|
75 |
-
|
76 |
-
### Recommendations
|
77 |
-
|
78 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
79 |
-
|
80 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
81 |
-
|
82 |
-
## How to Get Started with the Model
|
83 |
-
|
84 |
-
Use the code below to get started with the model.
|
85 |
-
|
86 |
-
[More Information Needed]
|
87 |
-
|
88 |
-
## Training Details
|
89 |
-
|
90 |
-
### Training Data
|
91 |
-
|
92 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
93 |
-
|
94 |
-
[More Information Needed]
|
95 |
-
|
96 |
-
### Training Procedure
|
97 |
-
|
98 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
99 |
-
|
100 |
-
#### Preprocessing [optional]
|
101 |
-
|
102 |
-
[More Information Needed]
|
103 |
-
|
104 |
-
|
105 |
-
#### Training Hyperparameters
|
106 |
-
|
107 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
108 |
-
|
109 |
-
#### Speeds, Sizes, Times [optional]
|
110 |
-
|
111 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
112 |
-
|
113 |
-
[More Information Needed]
|
114 |
-
|
115 |
-
## Evaluation
|
116 |
-
|
117 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
118 |
|
119 |
-
### Testing Data, Factors & Metrics
|
120 |
|
121 |
-
|
122 |
|
123 |
-
|
|
|
|
|
|
|
124 |
|
125 |
-
|
|
|
|
|
126 |
|
127 |
-
|
|
|
|
|
|
|
128 |
|
129 |
-
|
|
|
|
|
|
|
|
|
130 |
|
131 |
-
|
|
|
|
|
|
|
|
|
132 |
|
133 |
-
#### Metrics
|
134 |
|
135 |
-
|
|
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
### Results
|
140 |
-
|
141 |
-
[More Information Needed]
|
142 |
-
|
143 |
-
#### Summary
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
## Model Examination [optional]
|
148 |
-
|
149 |
-
<!-- Relevant interpretability work for the model goes here -->
|
150 |
-
|
151 |
-
[More Information Needed]
|
152 |
-
|
153 |
-
## Environmental Impact
|
154 |
-
|
155 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
156 |
-
|
157 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
158 |
-
|
159 |
-
- **Hardware Type:** [More Information Needed]
|
160 |
-
- **Hours used:** [More Information Needed]
|
161 |
-
- **Cloud Provider:** [More Information Needed]
|
162 |
-
- **Compute Region:** [More Information Needed]
|
163 |
-
- **Carbon Emitted:** [More Information Needed]
|
164 |
-
|
165 |
-
## Technical Specifications [optional]
|
166 |
-
|
167 |
-
### Model Architecture and Objective
|
168 |
-
|
169 |
-
[More Information Needed]
|
170 |
-
|
171 |
-
### Compute Infrastructure
|
172 |
-
|
173 |
-
[More Information Needed]
|
174 |
-
|
175 |
-
#### Hardware
|
176 |
-
|
177 |
-
[More Information Needed]
|
178 |
-
|
179 |
-
#### Software
|
180 |
-
|
181 |
-
[More Information Needed]
|
182 |
-
|
183 |
-
## Citation [optional]
|
184 |
-
|
185 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
186 |
-
|
187 |
-
**BibTeX:**
|
188 |
-
|
189 |
-
[More Information Needed]
|
190 |
-
|
191 |
-
**APA:**
|
192 |
-
|
193 |
-
[More Information Needed]
|
194 |
-
|
195 |
-
## Glossary [optional]
|
196 |
-
|
197 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
198 |
-
|
199 |
-
[More Information Needed]
|
200 |
-
|
201 |
-
## More Information [optional]
|
202 |
-
|
203 |
-
[More Information Needed]
|
204 |
-
|
205 |
-
## Model Card Authors [optional]
|
206 |
-
|
207 |
-
[More Information Needed]
|
208 |
|
209 |
## Model Card Contact
|
210 |
-
|
211 |
-
[More Information Needed]
|
|
|
21 |
</p>
|
22 |
|
23 |
|
24 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
25 |
|
26 |
+
## Model Description
|
27 |
|
28 |
<!-- Provide a longer summary of what this model is. -->
|
29 |
|
30 |
+
- **Developed by:** Neura company
|
31 |
+
- **Funded by:** Neura
|
32 |
+
- **Model type:** Whisper Base
|
33 |
+
- **Language(s) (NLP):** Persian
|
34 |
|
35 |
+
## Model Architecture
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
This model uses a FastConformer-TDT architecture. FastConformer [1] is an optimized version of the Conformer model with 8x depthwise-separable convolutional downsampling.
|
38 |
+
You may find more information on the details of FastConformer here: Fast-Conformer Model.
|
39 |
+
[Fast Conformer with Linearly Scalable Attention for Efficient
|
40 |
+
Speech Recognition](https://arxiv.org/abs/2305.05084).
|
|
|
|
|
|
|
41 |
|
42 |
## Uses
|
43 |
+
Check out the Google Colab demo to run NeuraSpeech ASR on a free-tier Google Colab instance: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/12d7zecB94ah7ZHKnDtJF58saLzdkZAj3#scrollTo=oNt032WVkQUa)
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
|
|
46 |
|
47 |
+
make sure these packages are installed:
|
48 |
|
49 |
+
```python
|
50 |
+
from IPython.display import Audio, display
|
51 |
+
display(Audio('persian_audio.mp3', rate = 32_000,autoplay=True))
|
52 |
+
```
|
53 |
|
54 |
+
```python
|
55 |
+
from transformers import WhisperProcessor, WhisperForConditionalGeneration
|
56 |
+
import librosa
|
57 |
|
58 |
+
# load model and processor
|
59 |
+
processor = WhisperProcessor.from_pretrained("Neurai/NeuraSpeech_WhisperBase")
|
60 |
+
model = WhisperForConditionalGeneration.from_pretrained("Neurai/NeuraSpeech_WhisperBase")
|
61 |
+
forced_decoder_ids = processor.get_decoder_prompt_ids(language="fa", task="transcribe")
|
62 |
|
63 |
+
array, sample_rate = librosa.load('persian_audio.mp3', sr=16000,mono=True)
|
64 |
+
sr = 16000
|
65 |
+
array = librosa.to_mono(array)
|
66 |
+
array = librosa.resample(array, orig_sr=sample_rate, target_sr=16000)
|
67 |
+
input_features = processor(array, sampling_rate=sr, return_tensors="pt").input_features
|
68 |
|
69 |
+
```
|
70 |
+
trascribed text :
|
71 |
+
```
|
72 |
+
او خواهان آزاد کردن بردگان بود
|
73 |
+
```
|
74 |
|
|
|
75 |
|
76 |
+
## More Information
|
77 |
+
https://neura.info
|
78 |
|
79 |
+
## Model Card Authors
|
80 |
+
Esmaeil Zahedi, Mohsen Yazdinejad
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
## Model Card Contact
|
83 | |
|