@@ -319,6 +319,8 @@ def writer(doc, output):
319319@common_options
320320@click .option ("--whisper/--rev" ,
321321 default = False , help = "Use OpenAI Whisper (ASR) instead of Rev.AI (default)." )
322+ @click .option ("--whisper_oai/--rev" ,
323+ default = False , help = "Use the OpenAI's Whisper implementation instead of Rev.AI (default)." )
322324@click .option ("--lang" ,
323325 help = "sample language in three-letter ISO 3166-1 alpha-3 code" ,
324326 show_default = True ,
@@ -328,7 +330,7 @@ def writer(doc, output):
328330@click .option ("--wor/--nowor" ,
329331 default = False , help = "Should we write word level alignment line? Default to no." )
330332@click .pass_context
331- def benchmark (ctx , in_dir , out_dir , lang , num_speakers , whisper , ** kwargs ):
333+ def benchmark (ctx , in_dir , out_dir , lang , num_speakers , whisper , whisper_oai , ** kwargs ):
332334 """Benchmark ASR utilities for their word accuracy"""
333335 def loader (file ):
334336 # try to find a .cha in the same directory
@@ -355,7 +357,8 @@ def writer(doc, output):
355357 _dispatch ("benchmark" , lang , num_speakers , ["mp3" , "mp4" , "wav" ], ctx ,
356358 in_dir , out_dir ,
357359 loader , writer , C ,
358- asr = "whisper" if whisper else "rev" , ** kwargs )
360+ asr = "whisper" if whisper else ("whisper_oai" if whisper_oai else "rev" ),
361+ ** kwargs )
359362
360363
361364#################### AVQI ################################
0 commit comments