You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 text was updated successfully, but these errors were encountered:
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)
The text was updated successfully, but these errors were encountered: