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

stft_257_1 directory not creating how to fix it please #3

Open
nkw97 opened this issue Jun 28, 2021 · 3 comments
Open

stft_257_1 directory not creating how to fix it please #3

nkw97 opened this issue Jun 28, 2021 · 3 comments

Comments

@nkw97
Copy link

nkw97 commented Jun 28, 2021

No description provided.

@aakrandan
Copy link

I am facing the same issue when executing STFT_feature_extractor.ipynb file.

FileNotFoundError                         Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_3812/1066858378.py in <module>
     13         for file in os.listdir("Dataset_audio/" + innerDir):
     14             if(file.endswith(".wav")):
---> 15                 save_STFT("Dataset_audio/" + innerDir + "/" + file, file, activity, subject)
     16                 print(subject,activity,file)

~\AppData\Local\Temp/ipykernel_3812/579597083.py in save_STFT(file, name, activity, subject)
     13     stft = np.abs(librosa.stft(trimmed, n_fft=512, hop_length=256, win_length=512))
     14     # save features
---> 15     np.save("STFT_features/stft_257_1/" + subject + "_" + name[:-4] + "_" + activity + ".npy", stft)
     16 

<__array_function__ internals> in save(*args, **kwargs)

c:\users\anant\appdata\local\programs\python\python39\lib\site-packages\numpy\lib\npyio.py in save(file, arr, allow_pickle, fix_imports)
    522         if not file.endswith('.npy'):
    523             file = file + '.npy'
--> 524         file_ctx = open(file, "wb")
    525 
    526     with file_ctx as fid:

FileNotFoundError: [Errno 2] No such file or directory: 'STFT_features/stft_257_1/s01_2019-05-22-16-37-48-757000__1_Calling.npy'

Could someone please help?

@nkw97
Copy link
Author

nkw97 commented Jul 23, 2021

you have to create /STFT_features/stft_257_1' directory manually and save s01-s17 all audio files

@nkw97
Copy link
Author

nkw97 commented Jul 23, 2021

image

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

2 participants