You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importnumpyasnpfrommoviepyimportversionfrommoviepy.editorimportVideoFileClip, AudioClipprint("MoviePy:", version.__version__)
defVAD(original_audio: AudioClip):
audio=original_audio.copy() # Copy an audio for local editingaudio.set_fps(16000) # Set sampling ratechunk_size=160# 16000 * 10 // 1000i=0# Counter used only for testingforaudio_chunkinoriginal_audio.iter_chunks(chunk_size):
# Convert to mono 16-bits PCMmono_chunk=np.mean(audio_chunk, 1).astype(dtype=np.int16)
# Print content lengthprint(f"{len(mono_chunk)=}")
ifi==3: # I only took out 3 for testing.break# stop loopi+=1# Count up the counter# You can change to other videos. ^_^video=VideoFileClip(
"videos\\【spooky's jump scare】 威猛蛾老大要來幫忙打鬼了!!!!! ft. @EvaEmolaCh.mp4"
)
VAD(video.audio)
Specifications
Python Version:3.12.3
MoviePy Version:1.0.3
Platform Name:Windows 11 Pro
Platform Version:23H2
The text was updated successfully, but these errors were encountered:
Expected Behavior
Actual Behavior
Steps to Reproduce the Problem
Specifications
3.12.3
1.0.3
Windows 11 Pro
23H2
The text was updated successfully, but these errors were encountered: