| | |
| | | kwargs = download_model(**kwargs) |
| | | |
| | | set_all_random_seed(kwargs.get("seed", 0)) |
| | | pdb.set_trace() |
| | | |
| | | device = kwargs.get("device", "cuda") |
| | | if not torch.cuda.is_available() or kwargs.get("ngpu", 1) == 0: |
| | | device = "cpu" |
| | |
| | | ind: int |
| | | """ |
| | | with autocast(False): |
| | | pdb.set_trace() |
| | | # Data augmentation |
| | | if self.specaug is not None and self.training: |
| | | speech, speech_lengths = self.specaug(speech, speech_lengths) |
| | | pdb.set_trace() |
| | | # Normalization for feature: e.g. Global-CMVN, Utterance-CMVN |
| | | if self.normalize is not None: |
| | | speech, speech_lengths = self.normalize(speech, speech_lengths) |
| | | pdb.set_trace() |
| | | # Forward encoder |
| | | # feats: (Batch, Length, Dim) |
| | | # -> encoder_out: (Batch, Length2, Dim2) |