carykh / recordTrimEdit

Records audio, trims it, and allows you to edit it, all in one fell swoop.
MIT License
66 stars 9 forks source link

Index error when running script #4

Closed GDNacho closed 5 months ago

GDNacho commented 5 months ago

Issue with the script, line 61, in devicename=names[mic_index],


IndexError: list index out of range

Running using python 3.12.2
GDNacho commented 5 months ago

After further investigating it seems at line 55 the script picks the microphone out of an array of audio devices, the index being 1 my microphone was listed in the array as its only item (position 0), so it wouldn't work

So i changed mic_index from 1 to 0 to pick my microphone, even still, i got more errors attempting to run the script after:

Traceback (most recent call last): File "C:\Users\Nacho\Desktop\YOUTUBE ONLY\recordTrimEdit-main\recordTrimEdit.py", line 230, in drawWaveforms(screen) File "C:\Users\Nacho\Desktop\YOUTUBE ONLY\recordTrimEdit-main\recordTrimEdit.py", line 128, in drawWaveforms audio_array = audio_array.reshape((882))

ValueError: cannot reshape array of size 1764 into shape (882,)

and i dont really know what this one means

GDNacho commented 5 months ago

okay after just changing the number to 1764 the program seems to work, but the audio its picking up from the mic is just really loud white noise and i don't have any idea why, i think i should notice I'm trying to run this script on Windows while Cary's showcase video was on a Mac, so maybe there's compatibility issues there?

GDNacho commented 5 months ago

ok the whole audio array thing is a different problem so I made a different issue for that one

as for the index error, i made a pull request that should fix the issue

ben9583 commented 5 months ago

The index error has been fixed; since that issue is moved to #6, I'll go ahead and close this one