Commit 697f92f1 authored by CodemodService Bot's avatar CodemodService Bot Committed by Facebook GitHub Bot
Browse files

[Codemod][FBSourceBlackLinter] Daily `arc lint --take BLACK`

Reviewed By: zertosh

Differential Revision: D33347867

fbshipit-source-id: 7672f65392e363c0359de2d86e745782a09cf9dc
parent 10cce198
from argparse import ArgumentParser
import pathlib
from argparse import ArgumentParser
import torch
import torchaudio
from torchaudio.prototype.rnnt_pipeline import EMFORMER_RNNT_BASE_LIBRISPEECH
......@@ -8,7 +9,10 @@ from torchaudio.prototype.rnnt_pipeline import EMFORMER_RNNT_BASE_LIBRISPEECH
def cli_main():
parser = ArgumentParser()
parser.add_argument(
"--librispeech_path", type=pathlib.Path, required=True, help="Path to LibriSpeech datasets.",
"--librispeech_path",
type=pathlib.Path,
required=True,
help="Path to LibriSpeech datasets.",
)
args = parser.parse_args()
......@@ -31,7 +35,7 @@ def cli_main():
# Streaming decode.
state, hypothesis = None, None
for idx in range(0, len(waveform), num_samples_segment):
segment = waveform[idx: idx + num_samples_segment_right_context]
segment = waveform[idx : idx + num_samples_segment_right_context]
segment = torch.nn.functional.pad(segment, (0, num_samples_segment_right_context - len(segment)))
with torch.no_grad():
features, length = streaming_feature_extractor(segment)
......
from abc import ABC, abstractmethod
from typing import Callable, List, Tuple
from dataclasses import dataclass
import json
import math
import pathlib
import torch
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Callable, List, Tuple
import torch
import torchaudio
from torchaudio._internal import download_url_to_file, load_state_dict_from_url, module_utils
from torchaudio.prototype import RNNT, RNNTBeamSearch, emformer_rnnt_base
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment