The sample is not runnable on macOS Intel i9 13th 13900k. I try to print log but can't pass this line
output = model(input)
import torch
import zipfile
import torchaudio
from glob import glob
device = torch.device('cpu') # gpu also works, but our models are fast enough for CPU
model, decoder, utils = torch.hub.load(repo_or_dir='snakers4/silero-models',
model='silero_stt',
language='en', # also available 'de', 'es'
device=device)
(read_batch, split_into_batches,
read_audio, prepare_model_input) = utils # see function signature for details
# download a single file in any format compatible with TorchAudio
torch.hub.download_url_to_file('https://opus-codec.org/static/examples/samples/speech_orig.wav',
dst ='speech_orig.wav', progress=True)
test_files = glob('speech_orig.wav')
batches = split_into_batches(test_files, batch_size=10)
input = prepare_model_input(read_batch(batches[0]),
device=device)
print("prepare output")
output = model(input)
print("the output is unable to print out.")
for example in output:
print(decoder(example.cpu()))
The sample is not runnable on macOS Intel i9 13th 13900k. I try to print log but can't pass this line output = model(input)