in StreamingASR/run_sasr.py [0:0]
def transcribe(np_array, should_print=True):
global state, hypo
tensor = torch.tensor(np_array)
spectrogram = transform(tensor).transpose(1, 0)
features = _piecewise_linear_log(spectrogram * _gain)
features = features.unsqueeze(0)[:, :-1]
features = (features - _mean) * _invstddev
transcript, hypo, state = wrapper(features, hypo, state)
if should_print and transcript:
print(transcript, end=" ", flush=True)