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

Missing CHUNK_SIZE when saving output #15

Closed musahaydar closed 4 months ago

musahaydar commented 4 months ago

When saving the file, the following error is produced

  File "/mnt/c/Users/musa/_Local/GitHub/recordTrimEdit/recordTrimEdit.py", line 312, in <module>
    FULL_LEN = len(sound_chunks)*CHUNK_SIZE
                                 ^^^^^^^^^^
NameError: name 'CHUNK_SIZE' is not defined

This can be fixed by defining a CHUNK_SIZE for use in lines 312-315, such as:

CHUNK_SIZE = default_sample_rate//default_chunk_rate

This value seems to have been removed in the PR #8, and I expect this is not the intended fix based on that PR.

ben9583 commented 4 months ago

Ah crap, I fixed this on my computer yesterday and committed it, but forgot to push. I'll go do that now.