Skip to content

Commit 9447794

Browse files
committed
fix pre-commit conflicts
1 parent 555de27 commit 9447794

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

recipes/RescueSpeech/ASR/noise-robust/hparams/robust_asr_16k.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ asr_pretrained: !new:speechbrain.utils.parameter_transfer.Pretrainer
185185
encoder: !ref <pretrained_enhance_path>/encoder.ckpt
186186
decoder: !ref <pretrained_enhance_path>/decoder.ckpt
187187
masknet: !ref <pretrained_enhance_path>/masknet.ckpt
188-
whisper: !ref <pretrained_whisper_model>/whisper.ckpt
188+
whisper: !ref <pretrained_whisper_path>/whisper.ckpt
189189

190190
modules:
191191
encoder: !ref <enhance_model[Encoder]>

recipes/RescueSpeech/rescuespeech_prepare.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,19 @@ def check_RescueSpeech_data_folders(data_folder):
524524

525525

526526
def unicode_normalisation(text):
527+
"""
528+
Normalizes the Unicode representation of a given text.
527529
530+
Arguments
531+
---------
532+
text : str
533+
The text to be normalized.
534+
535+
Returns
536+
-------
537+
str
538+
The normalized text.
539+
"""
528540
try:
529541
text = unicode(text, "utf-8")
530542
except NameError: # unicode is a default on python 3
@@ -562,6 +574,19 @@ def data_cleaning(words):
562574

563575

564576
def strip_accents(text):
577+
"""
578+
Strips accents from a given text string.
579+
580+
Arguments:
581+
----------
582+
text : str
583+
The text from which accents are to be stripped.
584+
585+
Returns
586+
-------
587+
str
588+
The text with accents stripped.
589+
"""
565590

566591
text = (
567592
unicodedata.normalize("NFD", text)

0 commit comments

Comments
 (0)