Code Monkey home page Code Monkey logo

recordtrimedit's People

Contributors

ben9583 avatar carykh avatar felipejz avatar thatonecalculator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

recordtrimedit's Issues

No microphone threshold

image

The program is missing a threshold for the mic and so... this happens.

Please add one so I can use this amazing tool!

Issue with ValueError with Array Size on Windows

This issue is mentioned in #16:

On Windows, the following error may occur:

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

This can happen in two places: line 162, where the expected size of the array from the sound buffer is hardcoded as

audio_array.reshape((882))

as well as line 316, where the audio is combined into a single array:

audio_full[i*chunk_size:i*chunk_size+chunk_size] = np.frombuffer(sound_chunks[i], dtype=np.int16)

The reason this occurs is because on Windows, with allowed_changes=AUDIO_ALLOW_FORMAT_CHANGE in the audio device, the size of the chunks may change (in my case as with #16, it is double, from 882 to 1764).

Simply disabling this option (i.e. setting allowed_changes=0) causes the program to continue working in my WSL environment as well as to work properly on Windows. A more involved solution would be to allow audio format changes and then, instead of using the values of SAMPLE_RATE and CHUNK_RATE from the config file to determine the size of the chunks (used in both places above), to retrieve these values from the audio device after it is initalized.

Array reshape error & Output is white noise

First:

line 230, in drawWaveforms(screen)
line 128, in drawWaveforms
audio_array = audio_array.reshape((882))

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

I changed the number to 1764 and the program seemed to work, but the audio input was white noise (the waveform was just a black wall)

Running on Windows 10 x86-64, Python 3.12.2
Opening a new issue because they're 2 different problems it seems

Error upon launch

Running on Windows

Traceback (most recent call last):
File "C:\Users\Pawlakov\Desktop\Informatyka\Repozytoria\recordTrimEdit\recordTrimEdit.py", line 303, in
drawWaveforms(screen)
File "C:\Users\Pawlakov\Desktop\Informatyka\Repozytoria\recordTrimEdit\recordTrimEdit.py", line 162, in drawWaveforms
audio_array.reshape((882))
ValueError: cannot reshape array of size 1764 into shape (882,)

Doesn't work

So I ran the code, and it said invalid syntax
I downloaded python and pygame, but it still doesn't work...

Missing CHUNK_SIZE when saving output

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.

Index error when running script

Issue with the script, line 61, in
devicename=names[mic_index],
~~~~~^^^^^^^^^^^
IndexError: list index out of range

Running using python 3.12.2

No license found

This project does not seem to have a license declared in an obvious way, or at all. A license should be added (as this project seems to be intended as open source) so that users can run, modify, study, distribute, and use the code.

https://choosealicense.com/no-permission/

Wont run

literally just wont run
heres what pops up

D:\github\recordTrimEdit>python recordTrimEdit.py
pygame 2.5.2 (SDL 2.28.3, Python 3.10.4)
Hello from the pygame community. https://www.pygame.org/contribute.html
KeyError: 0

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\github\recordTrimEdit\recordTrimEdit.py", line 188, in
for event in pg.event.get():
SystemError: returned a result with an exception set

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.