Coder Social home page Coder Social logo

kukrak / learningfromaudio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from theadamsabra/learningfromaudio

0.0 0.0 0.0 20.01 MB

Understand of the fundamentals of digital signal processing for Machine Learning/Deep Learning applications.

Jupyter Notebook 99.96% Python 0.04%

learningfromaudio's Introduction

Learning from Audio

image

Learning from Audio is a series of Medium articles written by Adam Sabra. Its main objective is to help those in the Data Science/Machine Learning field break into the audio domain starting from the basics of signal processing and build up towards more complex topics.

This GitHub repository will host the code and figures used within the articles.

Important Note:

You will find a discrepancy between the Medium articles and the Jupyter notebooks. I highly suggest using the Jupyter notebooks for more consistency.

I switched out the studied files from instrument sounds to high resolution snippets of different genres. The published Medium articles still have the old data whereas the Jupyter notebooks have been updated.

Furthermore, because of copyright issues, I am not allowed to share the snippets. However, I have created a command line interface via snip_audio.py for you to create your own snippets. Usage on the CLI will be below.

Environment Creation

As you will see in the repository there is a environment.yml file. Please use this to set up your virtual environment and create a Jupyter kernel with the newly created environment. To create the environment, run the following:

$ conda env create -f environment.yml

Once the environment has been created, simply activate it.

$ conda activate med-audio

If you do not know how to link an environment to a kernel, this article will be useful for you.

Create Snippets via Command Line

As mentioned before, I cannot share the snippets within the Jupyter notebooks. However, thanks to an issue being raised, I decided to create a quick and easy CLI for you to create your own snippets. The following tutorial assumes you are in the med-audio environment and in the repository's directory.

The required parameters are the following:

  • -p: The path to the audio file being sliced. (str)
  • -n: Name of the file to be saved. For your own sake, save it as something simple, such as rb, song1, etc. The .wav extension will be added for you already. (str)
  • -sr: Sample rate of the audio to be loaded in. (int)
  • -sec: Number of seconds you want the snippet to be. (int)

To run the file, simply run the following:

(med-audio)$ python3 snip_audio.py -p "path/to/song" -n "song1" -sr 22050 -sec 3 

The above example will save a new 3 second long file called song1.wav and it will be saved in the snippets directory.

Links to Articles:

learningfromaudio's People

Contributors

theadamsabra avatar

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.