Comments (4)
use the below script to convert .au file into .wav file
genres = 0
genre_names = ['blues','classical','country','disco','hiphop','jazz','metal','pop','reggae','rock']
cur_time = time.time()
while genres<10:
folder_name = genre_names[genres]
songs = os.listdir('data/' + folder_name)
print('processing folder: ', folder_name)
song_number = 0
while song_number<100:
filename = songs[song_number]
path = 'data/'+folder_name+'/'+filename
song = AudioSegment.from_file(path,'au')
path_export = 'data_wav/'+folder_name+'/'+str(song_number)+'.wav'
song.export(path_export,format='wav')
song_number += 1
genres +=1
final_time = time.time()
time_taken = final_time - cur_time
print('time taken : ', time_taken/60)
and then generate images using below script
genres = 0
genre_names = ['blues','classical','country','disco','hiphop','jazz','metal','pop','reggae','rock']
cur_time = time.time()
while genres<10:
folder_name = genre_names[genres]
songs = os.listdir('data_wav/' + folder_name)
print('processing folder: ', folder_name)
song_number = 0
while song_number<100:
filename = songs[song_number]
path = 'data_wav/'+folder_name+'/'+filename
graph_spectrogram(path,folder_name,song_number)
song_number += 1
genres +=1
final_time = time.time()
time_taken = final_time - cur_time
print('time taken : ', time_taken/60)
from audio-to-spectrogram.
more on this here ---> https://github.com/adibyte95/music-genre-classification
from audio-to-spectrogram.
@jayrodge i don't think there is any difference ...not that i know of
from audio-to-spectrogram.
Thanks @adibyte95!
just wanted to know that is there any difference between converting .au-> spectrogram and .au->.wav->spectrogram?
from audio-to-spectrogram.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audio-to-spectrogram.