Skip to content

FunASR-powered video transcription, subtitle generation, and LLM-assisted clipping tool with a local Gradio UI.

1.修复了在音频模式下的报错问题(launch.py line 24,少传了一个参数导致state接收到的参数实际为hotwords的值) 2.修复了日志format问题(videoclipper.py line 41)

xlchen546a7eb55b05
diff --git a/funclip/launch.py b/funclip/launch.py
index 0473770..b163ed1 100644
--- a/funclip/launch.py
+++ b/funclip/launch.py
@@ -21,7 +21,7 @@ if __name__ == "__main__":
theme = gr.Theme.load("funclip/utils/theme.json")
def audio_recog(audio_input, sd_switch, hotwords, output_dir):
- return audio_clipper.recog(audio_input, sd_switch, hotwords, output_dir=output_dir)
+ return audio_clipper.recog(audio_input, sd_switch, None, hotwords, output_dir=output_dir)
def video_recog(video_input, sd_switch, hotwords, output_dir):
return audio_clipper.video_recog(video_input, sd_switch, hotwords, output_dir=output_dir)
diff --git a/funclip/videoclipper.py b/funclip/videoclipper.py
index c12816c..ae66d5e 100644
--- a/funclip/videoclipper.py
+++ b/funclip/videoclipper.py
@@ -38,7 +38,7 @@ class VideoClipper():
if sr != 16000: # resample with librosa
data = librosa.resample(data, orig_sr=sr, target_sr=16000)
if len(data.shape) == 2: # multi-channel wav input
- logging.warning("Input wav shape: {}, only first channel reserved.").format(data.shape)
+ logging.warning("Input wav shape: {}, only first channel reserved.".format(data.shape))
data = data[:,0]
state['audio_input'] = (sr, data)
if sd_switch == 'Yes':