8/10/2023 0 Comments Best speech to text python![]() ![]() Import os import torch import subprocess import tensorflow as tf import tensorflow_hub as tf_hub from omegaconf import OmegaConf language = 'en' # also available 'de', 'es' # load provided utils using torch.hub for brevity _, decoder, utils = torch. run( None, ort_inputs)ĭecoded = decoder( torch. # actual onnx inference and decoding onnx_input = input. Input = prepare_model_input( read_batch( batches)) download_url_to_file( '', dst = 'speech_orig.wav', progress = True)īatches = split_into_batches( test_files, batch_size = 10) # download a single file, any format compatible with TorchAudio torch. keys())Īssert language in available_languages # load the actual ONNX model torch. download_url_to_file( '', 'models.yml')Īvailable_languages = list( models. Read_audio, prepare_model_input) = utils # see available models torch. load( repo_or_dir = 'snakers4/silero-models', model = 'silero_stt', language = language) Import onnx import torch import onnxruntime from omegaconf import OmegaConf language = 'en' # also available 'de', 'es' # load provided utils _, decoder, utils = torch. All examples are maintained to work with the latest major packaged versions of the installed libraries. Please see the provided Colab for details for each example below. tensorflow_hub, latest just should work.torchaudio, latest version bound to PyTorch should work.torch, 1.8+ (used to clone the repo in tf and onnx examples), breaking changes for version older than 1.6.Any meta-data and newer versions will be added there.Ĭurrently we provide the following checkpoints: ![]() ![]() Support for 16kHz and 8kHz out of the box Īll of the provided models are listed in the models.yml file.Faster than real-time on one CPU thread (!!!).We provide quality comparable to Google’s STT (and sometimes even better) and we are not Google.Īlso we have published TTS models that satisfy the following criteria: Silero Models: pre-trained enterprise-grade STT / TTS models and benchmarks.Įnterprise-grade STT made refreshingly simple (seriously, see benchmarks). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |