ArdenButterfield / stammer

Recreate any audio track by rearranging the frames of another video
MIT License
434 stars 29 forks source link

A problem that occurs after splitting the frames #78

Open DigitalOmega97 opened 8 months ago

DigitalOmega97 commented 8 months ago

I'm not sure what is causing this but it errors out no matter if I use MP4 or MP3 files, seems to be related to when it rearranges the audio maybe?

Calculating video length Separating video frames reading audiops= 63 q=0.0 Lsize=N/A time=00:00:02.50 bitrate=N/A dup=1 drop=0 c:\Games\stammer-main\stammer.py:240: WavFileWarning: Chunk (non-data) not understood, skipping it. _, carrier_audio = wavfile.read(get_audio_as_wav_bytes(carrierpath)) c:\Games\stammer-main\stammer.py:241: WavFileWarning: Chunk (non-data) not understood, skipping it. , modulator_audio = wavfile.read(get_audio_as_wav_bytes(modulator_path)) analyzing audio Traceback (most recent call last): File "c:\Games\stammer-main\stammer.py", line 307, in main() File "c:\Games\stammer-main\stammer.py", line 303, in main process(*vars(args)) File "c:\Games\stammer-main\stammer.py", line 246, in process matcher = BasicAudioMatcher(carrier_audio, modulator_audio, INTERNAL_SAMPLERATE, frame_length) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Games\stammer-main\audio_matching.py", line 19, in init self.make_best_matches() File "c:\Games\stammer-main\audio_matching.py", line 62, in make_best_matches self.carrier_frames = self.make_frames(self.carrier, self.samples_per_frame) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Games\stammer-main\audio_matching.py", line 30, in make_frames frames = np.zeros((num_frames, frame_length 2), dtype=input_audio.dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: negative dimensions are not allowed