jonatasgrosman
commited on
Commit
•
ac9c2a6
1
Parent(s):
4d159be
Update README.md
Browse files
README.md
CHANGED
@@ -41,7 +41,20 @@ The script used for training can be found here: https://github.com/jonatasgrosma
|
|
41 |
|
42 |
## Usage
|
43 |
|
44 |
-
The model can be used directly (without a language model) as follows
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
```python
|
47 |
import torch
|
|
|
41 |
|
42 |
## Usage
|
43 |
|
44 |
+
The model can be used directly (without a language model) as follows...
|
45 |
+
|
46 |
+
Using the [asrecognition](https://github.com/jonatasgrosman/asrecognition) library:
|
47 |
+
|
48 |
+
```python
|
49 |
+
from asrecognition import ASREngine
|
50 |
+
|
51 |
+
asr = ASREngine("fr", model_path="jonatasgrosman/wav2vec2-large-fr-voxpopuli-french")
|
52 |
+
|
53 |
+
audio_paths = ["/path/to/file.mp3", "/path/to/another_file.wav"]
|
54 |
+
transcriptions = asr.transcribe(audio_paths)
|
55 |
+
```
|
56 |
+
|
57 |
+
Writing your own inference script:
|
58 |
|
59 |
```python
|
60 |
import torch
|