jhj0517 commited on
Commit
4328c6a
·
1 Parent(s): b253e57

add debuggign function

Browse files
Files changed (1) hide show
  1. modules/whisper/whisper_base.py +35 -0
modules/whisper/whisper_base.py CHANGED
@@ -125,6 +125,7 @@ class WhisperBase(ABC):
125
  elapsed_time += elapsed_time_diarization
126
  return result, elapsed_time
127
 
 
128
  @spaces.GPU(duration=120)
129
  def transcribe_file(self,
130
  files: list,
@@ -136,6 +137,40 @@ class WhisperBase(ABC):
136
  """
137
  Write subtitle file from Files
138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  Parameters
140
  ----------
141
  files: list
 
125
  elapsed_time += elapsed_time_diarization
126
  return result, elapsed_time
127
 
128
+ #debug
129
  @spaces.GPU(duration=120)
130
  def transcribe_file(self,
131
  files: list,
 
137
  """
138
  Write subtitle file from Files
139
 
140
+ Parameters
141
+ ----------
142
+ files: list
143
+ List of files to transcribe from gr.Files()
144
+ file_format: str
145
+ Subtitle File format to write from gr.Dropdown(). Supported format: [SRT, WebVTT, txt]
146
+ add_timestamp: bool
147
+ Boolean value from gr.Checkbox() that determines whether to add a timestamp at the end of the subtitle filename.
148
+ progress: gr.Progress
149
+ Indicator to show progress directly in gradio.
150
+ *whisper_params: tuple
151
+ Parameters related with whisper. This will be dealt with "WhisperParameters" data class
152
+
153
+ Returns
154
+ ----------
155
+ result_str:
156
+ Result of transcription to return to gr.Textbox()
157
+ result_file_path:
158
+ Output file path to return to gr.Files()
159
+ """
160
+ print('Transcription START')
161
+
162
+
163
+ @spaces.GPU(duration=120)
164
+ def transcribe_file_releas(self,
165
+ files: list,
166
+ file_format: str,
167
+ add_timestamp: bool,
168
+ progress=gr.Progress(),
169
+ *whisper_params,
170
+ ):
171
+ """
172
+ Write subtitle file from Files
173
+
174
  Parameters
175
  ----------
176
  files: list