Skip to content

Commit 3d2cb42

Browse files
committed
Typo fixes and add cspell ignores
1 parent a253500 commit 3d2cb42

84 files changed

Lines changed: 185 additions & 180 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

recipes/AISHELL-1/ASR/transformer/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def on_fit_start(self):
256256
self.checkpointer.recover_if_possible()
257257

258258
def on_evaluate_start(self, max_key=None, min_key=None):
259-
"""perform checkpoint averge if needed"""
259+
"""perform checkpoint average if needed"""
260260
super().on_evaluate_start()
261261

262262
ckpts = self.checkpointer.find_checkpoints(

recipes/AISHELL-1/ASR/transformer/train_with_wav2vect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def on_fit_start(self):
241241
)
242242

243243
def on_evaluate_start(self, max_key=None, min_key=None):
244-
"""perform checkpoint averge if needed"""
244+
"""perform checkpoint average if needed"""
245245
super().on_evaluate_start()
246246

247247
ckpts = self.checkpointer.find_checkpoints(

recipes/AMI/Diarization/experiment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def embedding_computation_loop(split, set_loader, stat_file):
109109
modelset = np.array(modelset, dtype="|O")
110110
segset = np.array(segset, dtype="|O")
111111

112-
# Intialize variables for start, stop and stat0.
112+
# Initialize variables for start, stop and stat0.
113113
s = np.array([None] * embeddings.shape[0])
114114
b = np.array([[1.0]] * embeddings.shape[0])
115115

@@ -397,7 +397,7 @@ def dev_nn_tuner(full_meta, split_type):
397397
DER_list = []
398398
pval = None
399399

400-
# Now assumming oracle num of speakers.
400+
# Now assuming oracle num of speakers.
401401
n_lambdas = 4
402402

403403
for nn in range(5, 15):
@@ -511,7 +511,7 @@ def audio_pipeline(wav):
511511
with open(params_file) as fin:
512512
params = load_hyperpyyaml(fin, overrides)
513513

514-
# Dataset prep (peparing metadata files)
514+
# Dataset prep (preparing metadata files)
515515
from ami_prepare import prepare_ami # noqa
516516

517517
if not params["skip_prep"]:

recipes/Aishell1Mix/separation/scripts/create_wham_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def create_wham_noise_metadata(wham_noise_dir, md_dir):
5252
dir_metadata = dir_metadata[dir_metadata["length"] >= num_samples]
5353
# Create save path
5454
save_path = os.path.join(md_dir, name + ".csv")
55-
print(f"Medatada file created in {save_path}")
55+
print(f"Metadata file created in {save_path}")
5656
dir_metadata.to_csv(save_path, index=False)
5757

5858

recipes/CommonLanguage/common_language_prepare.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def prepare_common_language(data_folder, save_folder, skip_prep=False):
8080
save_folder : str
8181
The directory where to store the csv files.
8282
max_duration : int, optional
83-
Max duration (in seconds) of training uterances.
83+
Max duration (in seconds) of training utterances.
8484
skip_prep: bool
8585
If True, skip data preparation.
8686
@@ -102,7 +102,7 @@ def prepare_common_language(data_folder, save_folder, skip_prep=False):
102102
# Setting the save folder
103103
os.makedirs(save_folder, exist_ok=True)
104104

105-
# Setting ouput files
105+
# Setting output files
106106
save_csv_train = os.path.join(save_folder, "train.csv")
107107
save_csv_dev = os.path.join(save_folder, "dev.csv")
108108
save_csv_test = os.path.join(save_folder, "test.csv")
@@ -246,7 +246,7 @@ def create_csv(wav_list, csv_file):
246246
# Actual name of the language
247247
language = path_parts[-4]
248248

249-
# Create a row with whole utterences
249+
# Create a row with whole utterances
250250
csv_line = [
251251
idx, # ID
252252
wav_file, # File name
@@ -264,7 +264,7 @@ def create_csv(wav_list, csv_file):
264264
# CSV column titles
265265
csv_header = ["ID", "wav", "wav_format", "duration", "language"]
266266

267-
# Add titles to the list at indexx 0
267+
# Add titles to the list at index 0
268268
csv_lines.insert(0, csv_header)
269269

270270
# Writing the csv lines
@@ -277,7 +277,7 @@ def create_csv(wav_list, csv_file):
277277
csv_writer.writerow(line)
278278

279279
# Final prints
280-
msg = f"{csv_file} sucessfully created!"
280+
msg = f"{csv_file} successfully created!"
281281
logger.info(msg)
282282
msg = f"Number of samples: {len(wav_list)}."
283283
logger.info(msg)

recipes/CommonLanguage/lang_id/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Similar to the X-Vector a bigger and more powerful ECAPA-TDNN model can be used.
99
The experiment is also fine-tuning of the trained speaker embeddings done for Speaker Identification task on VoxCeleb, and can be accessed on [HuggingFace](https://huggingface.co/speechbrain/spkrec-ecapa-voxceleb). Therefore, most of the architecture choices come from that task.
1010

1111
Data augmentation and environmental corruption are done by concatenating waveforms, dropout, speed change, reverberation, noise, and noise+rev. The batch is double size of the original one. This may lead to
12-
better performance, at the cost of longer training time and higher compute resourses.
12+
better performance, at the cost of longer training time and higher compute resources.
1313

1414
# Performance
1515
| Release | hyperparams file | Val. Err | Test Err | Model link | GPUs |

recipes/CommonLanguage/lang_id/hparams/train_ecapa_tdnn.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ embedding_model: !new:speechbrain.lobes.models.ECAPA_TDNN.ECAPA_TDNN
136136
attention_channels: !ref <emb_attention_channels>
137137
lin_neurons: !ref <emb_dim>
138138

139-
# Classifier baseed on cosine distance
139+
# Classifier based on cosine distance
140140
classifier: !new:speechbrain.lobes.models.ECAPA_TDNN.Classifier
141141
input_size: !ref <emb_dim>
142142
out_neurons: !ref <n_languages>

recipes/CommonLanguage/lang_id/train.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def dataio_prep(hparams):
193193
to the appropriate DynamicItemDataset object.
194194
"""
195195

196-
# Initialization of the label encoder. The label encoder assignes to each
196+
# Initialization of the label encoder. The label encoder assigns to each
197197
# of the observed label a unique index (e.g, 'lang01': 0, 'lang02': 1, ..)
198198
language_encoder = sb.dataio.encoder.CategoricalEncoder()
199199

@@ -229,7 +229,7 @@ def label_pipeline(language):
229229

230230
# Load or compute the label encoder (with multi-GPU DDP support)
231231
# Please, take a look into the lab_enc_file to see the label to index
232-
# mappinng.
232+
# mapping.
233233
language_encoder_file = os.path.join(
234234
hparams["save_folder"], "language_encoder.txt"
235235
)
@@ -278,7 +278,7 @@ def label_pipeline(language):
278278
# Create dataset objects "train", "dev", and "test" and language_encoder
279279
datasets, language_encoder = dataio_prep(hparams)
280280

281-
# Fetch and laod pretrained modules
281+
# Fetch and load pretrained modules
282282
sb.utils.distributed.run_on_main(hparams["pretrainer"].collect_files)
283283
hparams["pretrainer"].load_collected()
284284

recipes/CommonVoice/ASR/CTC/train_with_wav2vec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
> python train_with_wav2vec2.py hparams/train_with_wav2vec2.yaml
88
99
With the default hyperparameters, the system employs a pretrained wav2vec2 encoder.
10-
The wav2vec2 model is pretrained following the model given in the hprams file.
10+
The wav2vec2 model is pretrained following the model given in the hparams file.
1111
It may be dependent on the language.
1212
1313
The neural network is trained with CTC on sub-word units estimated with

recipes/CommonVoice/ASR/seq2seq/train_with_wav2vec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
> python train_with_wav2vec2.py hparams/train_with_wav2vec2.yaml
88
99
With the default hyperparameters, the system employs a pretrained wav2vec2 encoder.
10-
The wav2vec2 model is pretrained following the XSLR French HuggingFace model:
10+
The wav2vec2 model is pretrained following the XLSR French HuggingFace model:
1111
facebook/wav2vec2-large-xlsr-53-french
1212
1313
The decoder is based on a standard GRU and BeamSearch (no LM).

0 commit comments

Comments
 (0)