Explorar el Código

remove auxiliary audio extension (#1021)

Co-authored-by: Jong Wook Kim <jongwook@openai.com>
Local State hace 2 años
padre
commit
c6e4e5efb3
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      whisper/utils.py

+ 1 - 0
whisper/utils.py

@@ -75,6 +75,7 @@ class ResultWriter:
 
     def __call__(self, result: dict, audio_path: str):
         audio_basename = os.path.basename(audio_path)
+        audio_basename = os.path.splitext(audio_basename)[0]
         output_path = os.path.join(
             self.output_dir, audio_basename + "." + self.extension
         )