angel-poc commited on
Commit
4f3aa11
1 Parent(s): 02c5709

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +34 -0
README.md CHANGED
@@ -42,6 +42,40 @@ This model was fine-tuned from a pre-trained Spanish [stt-es-citrinet-512](https
42
 
43
  You can use this model for Automatic Speech Recognition (ASR) in catalan.
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  ## Additional information
47
 
 
42
 
43
  You can use this model for Automatic Speech Recognition (ASR) in catalan.
44
 
45
+ ## How to use
46
+ ### Usage
47
+
48
+ Requiered libraries:
49
+
50
+ ```bash
51
+ pip install nemo_toolkit['all']
52
+ ```
53
+
54
+ Clone the repository to download the model:
55
+
56
+ ```bash
57
+ git clone https://huggingface.co/projecte-aina/stt-ca-citrinet-512
58
+ ```
59
+
60
+ Given that `NEMO_PATH` is the path that points to the downloaded stt-ca-citrinet-512.nemo file, to do inference over a set of `.wav` files you should:
61
+
62
+ ```python
63
+ # Load the model
64
+ model = nemo_asr.models.EncDecCTCModel.restore_from(NEMO_PATH)
65
+
66
+ # Create a list pointing to the audio files
67
+ paths2audio_files = ["audio_1.wav", ..., "audio_n.wav"]
68
+
69
+
70
+ # Fix the batch size to whatever number suits your purpose
71
+ batch_size = 8
72
+
73
+ transcriptions = model.transcribe(paths2audio_files=paths2audio_files,
74
+ batch_size=2)
75
+ # Visualize the transcriptions
76
+ print(transcriptions)
77
+
78
+ ```
79
 
80
  ## Additional information
81