Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Mddct committed Oct 31, 2023
1 parent 2c6a7db commit 43265f6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion wenet/cli/paraformer_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def transcribe(self, audio_file: str, tokens_info: bool = False) -> dict:
return result

def align(self, audio_file: str, label: str) -> dict:
raise NotImplementedError
raise NotImplementedError("Align is currently not supported")


def load_model(language: str = None, model_dir: str = None) -> Paraformer:
Expand Down
5 changes: 1 addition & 4 deletions wenet/paraformer/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
"""

import math
from typing import Dict, List, Optional, Tuple
from typing import Optional, Tuple
import torch
from wenet.cif.predictor import Predictor
from wenet.paraformer.attention import (DummyMultiHeadSANM,
MultiHeadAttentionCross,
MultiHeadedAttentionSANM)
from wenet.paraformer.search import paraformer_beam_search, paraformer_greedy_search
from wenet.transformer.search import DecodeResult
from wenet.transformer.encoder import BaseEncoder
from wenet.transformer.decoder import TransformerDecoder
from wenet.transformer.decoder_layer import DecoderLayer
Expand Down
2 changes: 1 addition & 1 deletion wenet/paraformer/paraformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def forward(
text: (Batch, Length)
text_lengths: (Batch,)
"""
raise NotImplementedError
raise NotImplementedError("Training is currently not supported")

def calc_predictor(self, encoder_out, encoder_out_lens):
encoder_mask = (~make_pad_mask(
Expand Down
1 change: 0 additions & 1 deletion wenet/utils/init_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from wenet.e_branchformer.encoder import EBranchformerEncoder
from wenet.squeezeformer.encoder import SqueezeformerEncoder
from wenet.efficient_conformer.encoder import EfficientConformerEncoder
from wenet.cif.predictor import Predictor
from wenet.utils.cmvn import load_cmvn


Expand Down

0 comments on commit 43265f6

Please sign in to comment.