twynb / AudioStreamSplitting

A tool that takes a long audio file, splits it into separate songs and attempts to identify them.
https://twynb.github.io/AudioStreamSplitting/
GNU General Public License v3.0
2 stars 0 forks source link

Frontend for Segmentation #49

Closed chubetho closed 1 year ago

chubetho commented 1 year ago

Implement intergration for fe

Update 12.09

.env

# .env

VITE_APP_NAME=Audio Splitter
VITE_OUTPUT_FILE_NAME_TEMPLATE={{TITLE}}
# .env.local

VITE_APP_NAME=Audio Splitter
VITE_OUTPUT_FILE_NAME_TEMPLATE={{TITLE}}
VITE_SERVICE_ACOUSTID_API_KEY={{SERVICE_ACOUSTID_API_KEY}}
VITE_SERVICE_SHAZAM_API_KEY={{SERVICE_SHAZAM_API_KEY}}

Update 14.09

chubetho commented 1 year ago

@JosuaE-FHWS can you fix error, when I want to split audio, I have this error from this line

yield librosa.load(
            path, mono=False, sr=samplerate, offset=offset, duration=duration
        ), start_time, duration
raise NoBackendError()
audioread.exceptions.NoBackendError

Before I merge main into this branch. It still works. Look this checkpoint

JosuaE-FHWS commented 1 year ago

@JosuaE-FHWS can you fix error, when I want to split audio, I have this error from this line

yield librosa.load(
            path, mono=False, sr=samplerate, offset=offset, duration=duration
        ), start_time, duration
raise NoBackendError()
audioread.exceptions.NoBackendError

Before I merge main into this branch. It still works. Look this checkpoint

I'm not entirely sure what the error is, however we had plans to remove the librosa.load() call from the yield there, since we currently don't use the result of it anyways. That would most likely resolve the issue.

chubetho commented 1 year ago

@ChrisItisdud I think we can merge it into main because the segmentation for fe worked in commit before the new segmentation logic was merged.

chubetho commented 1 year ago

@ChrisItisdud Wait. I will also implement store with backend here by the way

twynb commented 1 year ago

I was about to say, this looks good to me but storing via frontend still doesn't work :D

chubetho commented 1 year ago

I was about to say, this looks good to me but storing via frontend still doesn't work :D

yeah in linux i could save but audio was like 2x speed :cry:

4lex0017 commented 1 year ago

@chubetho Please check backend modules . Seems to me there are a lot of lines that are reverted back to a previous state

chubetho commented 1 year ago

@chubetho Please check backend modules . Seems to me there are a lot of lines that are reverted back to a previous state

Segmentation.py is reverted because only old version is working. Just for demo how fe works. Will be reverted again in the future With other modules I can really tell what is missing

4lex0017 commented 1 year ago

@chubetho I wouldnt revert it. The old version is quite unaccurate. Also the new version works if only used in backend. Maybe its a problem with the Filetype you are trying to read? Otherwise just remove the librosa load. also maybe try with package "ffmpeg"

chubetho commented 1 year ago

@chubetho I wouldnt revert it. The old version is quite unaccurate. Also the new version works if only used in backend. Maybe its a problem with the Filetype you are trying to read? Otherwise just remove the librosa load. also maybe try with package "ffmpeg"

FE only pass file path back to BE to process. So Im not sure something is wrong w file type. Furthermore I dont want to touch so much in BE, because I dont understand it much like you all do. Can you try the latest version of this branch? And then switch back to new segmentaion logic to find out why it causing "no backend error"?

JosuaE-FHWS commented 1 year ago

@chubetho I can't reproduce the error on my side, it seems to work just fine. Can you try to merge the remove-load-from-segmentation-generator branch into this and test again? I think this might fix the error.

chubetho commented 1 year ago

@chubetho I can't reproduce the error on my side, it seems to work just fine. Can you try to merge the remove-load-from-segmentation-generator branch into this and test again? I think this might fix the error.

image I confirm this works now :+1:

chubetho commented 1 year ago

@ChrisItisdud This branch is ready to be merged