juancopi81 commited on
Commit
6472070
1 Parent(s): d5c9693

Change transcriber

Browse files
Files changed (1) hide show
  1. transcriber.py +3 -6
transcriber.py CHANGED
@@ -5,10 +5,7 @@ class Transcriber:
5
  self.pipe = pipe
6
 
7
  def transcribe(self, file_path: str = "yt_audio.mp3") -> str:
8
- print(self.pipe)
9
  print("Audo file at:", file_path)
10
- try:
11
- transcription = self.pipe(file_path)["text"]
12
- return transcription
13
- except:
14
- return "ERROR: No audio file found to transcribe"
 
5
  self.pipe = pipe
6
 
7
  def transcribe(self, file_path: str = "yt_audio.mp3") -> str:
8
+ print("Pipe:", self.pipe)
9
  print("Audo file at:", file_path)
10
+ transcription = self.pipe(file_path)["text"]
11
+ return transcription