hecko
05/21/2022, 6:11 PMuser
05/21/2022, 6:29 PMReclezon
05/21/2022, 6:34 PMhecko
05/21/2022, 6:35 PMhecko
05/21/2022, 6:35 PMhecko
05/21/2022, 6:35 PMReclezon
05/21/2022, 6:37 PMhecko
05/21/2022, 6:38 PMhecko
05/21/2022, 6:38 PMhecko
05/21/2022, 6:40 PMpy
!pip install transformers
import os
from transformers import pipeline
asr = pipeline(task = "automatic-speech-recognition", model = "boris/xlsr-en-punctuation") #, device = 0) if cpu
files = [f.path for f in os.scandir("/content/wherever/wavs") if os.path.isfile(f.path)]
texts = asr(files)
list_txt = [f"wavs/{os.path.basename(f)}|{t['text']}" for f, t in zip(files, texts)]
with open("/content/wherever/list.txt", "w") as f:
f.write("\n".join(list_txt))Reclezon
05/21/2022, 6:44 PMhecko
05/21/2022, 6:45 PMhecko
05/21/2022, 6:45 PMReclezon
05/21/2022, 6:47 PMReclezon
05/21/2022, 6:48 PMhecko
05/21/2022, 6:52 PMhecko
05/21/2022, 6:52 PMhecko
05/21/2022, 6:52 PMReclezon
05/21/2022, 6:59 PMhecko
05/21/2022, 7:00 PMhecko
05/21/2022, 7:00 PMReclezon
05/21/2022, 7:00 PMReclezon
05/21/2022, 7:01 PMhecko
05/21/2022, 7:01 PMReclezon
05/21/2022, 7:03 PMhecko
05/21/2022, 7:04 PMhecko
05/21/2022, 7:05 PMReclezon
05/21/2022, 7:05 PMhecko
05/21/2022, 7:05 PMhecko
05/21/2022, 7:05 PM