j-tobias commited on
Commit
ecc69a8
·
1 Parent(s): 4c0593e

updated requirements

Browse files
Files changed (2) hide show
  1. model.py +7 -2
  2. requirements.txt +9 -1
model.py CHANGED
@@ -1,7 +1,9 @@
1
- from transformers import WhisperProcessor, WhisperForConditionalGeneration
2
  from transformers import Speech2TextForConditionalGeneration, Speech2TextProcessor
3
  from transformers import pipeline
4
 
 
 
5
  from dataset import Dataset
6
  from utils import data
7
 
@@ -14,7 +16,8 @@ class Model:
14
 
15
  self.options = [
16
  "openai/whisper-tiny.en",
17
- "facebook/s2t-medium-librispeech-asr"
 
18
  ]
19
  self.selected = None
20
  self.pipeline = None
@@ -41,6 +44,8 @@ class Model:
41
  self.model = Speech2TextForConditionalGeneration.from_pretrained("facebook/s2t-medium-librispeech-asr")
42
  self.processor = Speech2TextProcessor.from_pretrained("facebook/s2t-medium-librispeech-asr", do_upper_case=True)
43
 
 
 
44
 
45
  def select(self, option:str=None):
46
  if option not in self.options:
 
1
+ # from transformers import WhisperProcessor, WhisperForConditionalGeneration
2
  from transformers import Speech2TextForConditionalGeneration, Speech2TextProcessor
3
  from transformers import pipeline
4
 
5
+ import nemo.collections.asr as nemo_asr
6
+
7
  from dataset import Dataset
8
  from utils import data
9
 
 
16
 
17
  self.options = [
18
  "openai/whisper-tiny.en",
19
+ "facebook/s2t-medium-librispeech-asr",
20
+ "nvidia/stt_en_fastconformer_ctc_large"
21
  ]
22
  self.selected = None
23
  self.pipeline = None
 
44
  self.model = Speech2TextForConditionalGeneration.from_pretrained("facebook/s2t-medium-librispeech-asr")
45
  self.processor = Speech2TextProcessor.from_pretrained("facebook/s2t-medium-librispeech-asr", do_upper_case=True)
46
 
47
+ elif option == "nvidia/stt_en_fastconformer_ctc_large":
48
+ self.model = nemo_asr.models.EncDecCTCModelBPE.from_pretrained(model_name="nvidia/stt_en_fastconformer_ctc_large")
49
 
50
  def select(self, option:str=None):
51
  if option not in self.options:
requirements.txt CHANGED
@@ -59,9 +59,11 @@ msgpack==1.0.8
59
  multidict==6.0.5
60
  multiprocess==0.70.16
61
  namex==0.0.8
 
62
  networkx==3.3
63
  numba==0.60.0
64
- numpy==1.26.4
 
65
  opt-einsum==3.3.0
66
  optree==0.12.1
67
  orjson==3.10.7
@@ -69,6 +71,7 @@ packaging==24.1
69
  pandas==2.2.2
70
  pillow==10.4.0
71
  platformdirs==4.2.2
 
72
  pooch==1.8.2
73
  protobuf==4.25.4
74
  pyarrow==17.0.0
@@ -87,6 +90,8 @@ rapidfuzz==3.9.6
87
  regex==2024.7.24
88
  requests==2.32.3
89
  rich==13.7.1
 
 
90
  ruff==0.5.7
91
  safetensors==0.4.4
92
  scikit-learn==1.5.1
@@ -100,11 +105,13 @@ soundfile==0.12.1
100
  soxr==0.4.0
101
  starlette==0.37.2
102
  sympy==1.13.1
 
103
  tensorboard==2.17.0
104
  tensorboard-data-server==0.7.2
105
  tensorflow==2.17.0
106
  tensorflow-io-gcs-filesystem==0.37.1
107
  termcolor==2.4.0
 
108
  tf_keras==2.17.0
109
  threadpoolctl==3.5.0
110
  tokenizers==0.19.1
@@ -119,6 +126,7 @@ urllib3==2.2.2
119
  uvicorn==0.30.5
120
  websockets==12.0
121
  Werkzeug==3.0.3
 
122
  wrapt==1.16.0
123
  xxhash==3.4.1
124
  yarl==1.9.4
 
59
  multidict==6.0.5
60
  multiprocess==0.70.16
61
  namex==0.0.8
62
+ nemo-toolkit==1.21.0
63
  networkx==3.3
64
  numba==0.60.0
65
+ numpy==1.23.5
66
+ onnx==1.16.2
67
  opt-einsum==3.3.0
68
  optree==0.12.1
69
  orjson==3.10.7
 
71
  pandas==2.2.2
72
  pillow==10.4.0
73
  platformdirs==4.2.2
74
+ plotly==5.23.0
75
  pooch==1.8.2
76
  protobuf==4.25.4
77
  pyarrow==17.0.0
 
90
  regex==2024.7.24
91
  requests==2.32.3
92
  rich==13.7.1
93
+ ruamel.yaml==0.18.6
94
+ ruamel.yaml.clib==0.2.8
95
  ruff==0.5.7
96
  safetensors==0.4.4
97
  scikit-learn==1.5.1
 
105
  soxr==0.4.0
106
  starlette==0.37.2
107
  sympy==1.13.1
108
+ tenacity==9.0.0
109
  tensorboard==2.17.0
110
  tensorboard-data-server==0.7.2
111
  tensorflow==2.17.0
112
  tensorflow-io-gcs-filesystem==0.37.1
113
  termcolor==2.4.0
114
+ text-unidecode==1.3
115
  tf_keras==2.17.0
116
  threadpoolctl==3.5.0
117
  tokenizers==0.19.1
 
126
  uvicorn==0.30.5
127
  websockets==12.0
128
  Werkzeug==3.0.3
129
+ wget==3.2
130
  wrapt==1.16.0
131
  xxhash==3.4.1
132
  yarl==1.9.4