FunASR-powered video transcription, subtitle generation, and LLM-assisted clipping tool with a local Gradio UI.
Python ai-toolsai-video-editingasrauto-subtitleschinesecontent-creationfunasrfunclipgradiollmparaformerspeech-recognitionspeech-to-textsubtitles-generatortranscriptionvideo-editingvideo-processingvideo-subtitlesvideo-transcriptionwhisper-alternative
update resample for audio
shixian.shief79f77eb642
diff --git a/paraclipper/videoclipper.py b/paraclipper/videoclipper.pyindex 6d9b91c..fc04904 100644--- a/paraclipper/videoclipper.py+++ b/paraclipper/videoclipper.py@@ -25,7 +25,9 @@ class VideoClipper():if state is None:state = {}sr, data = audio_input- assert sr == 16000, "16kHz sample rate required, {} given.".format(sr)+ # assert sr == 16000, "16kHz sample rate required, {} given.".format(sr)+ if sr != 16000: # resample with librosa+ data = librosa.resample(data, orig_sr=sr, target_sr=16000)if len(data.shape) == 2: # multi-channel wav inputlogging.warning("Input wav shape: {}, only first channel reserved.").format(data.shape)data = data[:,0]