Spaces:
Build error
Build error
File size: 351 Bytes
6249bc9 6472070 195e557 6472070 |
1 2 3 4 5 6 7 8 9 10 11 |
from transformers import pipeline
class Transcriber:
def __init__(self, pipe: pipeline) -> None:
self.pipe = pipe
def transcribe(self, file_path: str = "yt_audio.mp3") -> str:
print("Pipe:", self.pipe)
print("Audo file at:", file_path)
transcription = self.pipe(file_path)["text"]
return transcription |