Sign in

In Thai music, Lukthung is a very unique and popular genre. Some people listen to both Lukthung and other typical genres like Pop and Rock, while others prefer only Lukthung. Although music classification is a widely studied topic, classifying Lukthung songs is a unique challenge we want to tackle at JOOX as we improve our music recommendation engine. Resulting from our research, our paper will be published at ICSEC 2019 and can be found here.

We will go through the paper in a series of blog posts. …

This is a series of our work to classify and tag Thai music on JOOX. This part will explain how we use the python library, LibROSA, to extract audio spectrograms and the four audio features below. In later blog posts, we’ll explain how we build our classification models for Thai songs.

  1. Spectrogram
  2. MFCC
  3. Chromagram
  4. Tempo
  5. Beats

Here are all the necessary libraries:

First, let’s load an audio file. The file can be both .wav or .mp3; sr is the sampling rate which has a default value of 22,050.

Poisson Distribution

Poisson Distribution is the discrete probability of count of events which occur randomly in a given interval of time. It is a limiting form of the binomial distribution in which n becomes very large and p is very very small (meaning the number of trials is very large while the probability of occurrences of outcome under observation is small.


Definition of Poisson Distribution

X =the number of events in a given interval

λ = mean number of events per interval

The probability of observing x events in a given interval is given by


Bunny data scientist who likes throwing carrots

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store