Update modules/whisper/whisper_base.py
Browse files
    	
        modules/whisper/whisper_base.py
    CHANGED
    
    | @@ -376,8 +376,7 @@ class WhisperBase(ABC): | |
| 376 | 
             
                            total_result += f'{info["subtitle"]}'
         | 
| 377 |  | 
| 378 | 
             
                            total_time += info["time_for_task"]
         | 
| 379 | 
            -
                             | 
| 380 | 
            -
                            total_info += (f'Input file:\t{info["input_source_file"]}\nLanguage:\t{info["lang"]} (probability {info["lang_prob"]}%)\n').expandtabs(8)
         | 
| 381 |  | 
| 382 | 
             
                            if params.is_translate:
         | 
| 383 | 
             
                                total_info += f'Translation:\t{info["transcription"]}\n\t⤷ Handled by OpenAI Whisper\n'
         | 
| @@ -389,6 +388,11 @@ class WhisperBase(ABC): | |
| 389 | 
             
                        total_info += f"\nTotal processing time: {self.format_time((time_end-time_start).total_seconds())}"
         | 
| 390 |  | 
| 391 | 
             
                        result_str = total_result.rstrip("\n")
         | 
|  | |
|  | |
|  | |
|  | |
|  | |
| 392 | 
             
                        result_file_path = [info['path'] for info in files_to_download.values()]
         | 
| 393 |  | 
| 394 | 
             
                        return [result_str,result_file_path,total_info]
         | 
|  | |
| 376 | 
             
                            total_result += f'{info["subtitle"]}'
         | 
| 377 |  | 
| 378 | 
             
                            total_time += info["time_for_task"]
         | 
| 379 | 
            +
                            total_info += f'Input file:\t{info["input_source_file"]}\nLanguage:\t{info["lang"]} (probability {info["lang_prob"]}%)\n'
         | 
|  | |
| 380 |  | 
| 381 | 
             
                            if params.is_translate:
         | 
| 382 | 
             
                                total_info += f'Translation:\t{info["transcription"]}\n\t⤷ Handled by OpenAI Whisper\n'
         | 
|  | |
| 388 | 
             
                        total_info += f"\nTotal processing time: {self.format_time((time_end-time_start).total_seconds())}"
         | 
| 389 |  | 
| 390 | 
             
                        result_str = total_result.rstrip("\n")
         | 
| 391 | 
            +
             | 
| 392 | 
            +
                        # Fix tab indents for info & result preview
         | 
| 393 | 
            +
                        total_info = total_info.expandtabs(8)
         | 
| 394 | 
            +
                        result_str = result_str.expandtabs(8)
         | 
| 395 | 
            +
                        
         | 
| 396 | 
             
                        result_file_path = [info['path'] for info in files_to_download.values()]
         | 
| 397 |  | 
| 398 | 
             
                        return [result_str,result_file_path,total_info]
         |