jonatasgrosman
commited on
Commit
•
e6151e8
1
Parent(s):
542632a
Update README.md
Browse files
README.md
CHANGED
@@ -43,15 +43,15 @@ The script used for training can be found here: https://github.com/jonatasgrosma
|
|
43 |
|
44 |
The model can be used directly (without a language model) as follows...
|
45 |
|
46 |
-
Using the [
|
47 |
|
48 |
```python
|
49 |
-
from
|
50 |
-
|
51 |
-
asr = ASREngine("zh-CN", model_path="jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn")
|
52 |
|
|
|
53 |
audio_paths = ["/path/to/file.mp3", "/path/to/another_file.wav"]
|
54 |
-
|
|
|
55 |
```
|
56 |
|
57 |
Writing your own inference script:
|
|
|
43 |
|
44 |
The model can be used directly (without a language model) as follows...
|
45 |
|
46 |
+
Using the [HuggingSound](https://github.com/jonatasgrosman/huggingsound) library:
|
47 |
|
48 |
```python
|
49 |
+
from huggingsound import SpeechRecognitionModel
|
|
|
|
|
50 |
|
51 |
+
model = SpeechRecognitionModel("jonatasgrosman/wav2vec2-large-xlsr-53-chinese-zh-cn")
|
52 |
audio_paths = ["/path/to/file.mp3", "/path/to/another_file.wav"]
|
53 |
+
|
54 |
+
transcriptions = model.transcribe(audio_paths)
|
55 |
```
|
56 |
|
57 |
Writing your own inference script:
|