Minor fixes.

This commit is contained in:
Fangjun Kuang 2022-03-23 17:35:39 +08:00
parent 127155b37d
commit 055406a67e
4 changed files with 6 additions and 12 deletions

View File

@ -55,7 +55,6 @@ from typing import List
import kaldifeat
import torch
import torch.nn as nn
import torchaudio
from beam_search import (
beam_search,
@ -67,7 +66,6 @@ from torch.nn.utils.rnn import pad_sequence
from train import get_params, get_transducer_model
from icefall.lexicon import Lexicon
from icefall.utils import AttributeDict
def get_parser():
@ -262,7 +260,9 @@ def main():
)
hyp_list.append(hyp)
hyps = [sp.decode(hyp).split() for hyp in hyp_list]
hyps = []
for hyp in hyp_list:
hyps.append([lexicon.token_table[i] for i in hyp])
s = "\n"
for filename, hyp in zip(params.sound_files, hyps):

View File

@ -55,7 +55,6 @@ from typing import List
import kaldifeat
import torch
import torch.nn as nn
import torchaudio
from beam_search import (
beam_search,
@ -67,7 +66,6 @@ from torch.nn.utils.rnn import pad_sequence
from train import get_params, get_transducer_model
from icefall.lexicon import Lexicon
from icefall.utils import AttributeDict
def get_parser():
@ -262,7 +260,9 @@ def main():
)
hyp_list.append(hyp)
hyps = [sp.decode(hyp).split() for hyp in hyp_list]
hyps = []
for hyp in hyp_list:
hyps.append([lexicon.token_table[i] for i in hyp])
s = "\n"
for filename, hyp in zip(params.sound_files, hyps):

View File

@ -59,7 +59,6 @@ from typing import List
import kaldifeat
import sentencepiece as spm
import torch
import torch.nn as nn
import torchaudio
from beam_search import (
beam_search,
@ -70,8 +69,6 @@ from beam_search import (
from torch.nn.utils.rnn import pad_sequence
from train import get_params, get_transducer_model
from icefall.utils import AttributeDict
def get_parser():
parser = argparse.ArgumentParser(

View File

@ -59,7 +59,6 @@ from typing import List
import kaldifeat
import sentencepiece as spm
import torch
import torch.nn as nn
import torchaudio
from beam_search import (
beam_search,
@ -70,8 +69,6 @@ from beam_search import (
from torch.nn.utils.rnn import pad_sequence
from train import get_params, get_transducer_model
from icefall.utils import AttributeDict
def get_parser():
parser = argparse.ArgumentParser(