Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A problem that occurs after splitting the frames #78

Open
DigitalOmega97 opened this issue Oct 11, 2023 · 0 comments
Open

A problem that occurs after splitting the frames #78

DigitalOmega97 opened this issue Oct 11, 2023 · 0 comments

Comments

@DigitalOmega97
Copy link

DigitalOmega97 commented Oct 11, 2023

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(carrier_path))
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant