Reader small image

You're reading from  Data Labeling in Machine Learning with Python

Product typeBook
Published inJan 2024
PublisherPackt
ISBN-139781804610541
Edition1st Edition
Right arrow
Author (1)
Vijaya Kumar Suda
Vijaya Kumar Suda
author image
Vijaya Kumar Suda

Vijaya Kumar Suda is a seasoned data and AI professional boasting over two decades of expertise collaborating with global clients. Having resided and worked in diverse locations such as Switzerland, Belgium, Mexico, Bahrain, India, Canada, and the USA, Vijaya has successfully assisted customers spanning various industries. Currently serving as a senior data and AI consultant at Microsoft, he is instrumental in guiding industry partners through their digital transformation endeavors using cutting-edge cloud technologies and AI capabilities. His proficiency encompasses architecture, data engineering, machine learning, generative AI, and cloud solutions.
Read more about Vijaya Kumar Suda

Right arrow

Hands-on – labeling audio data using a CNN

In this section, we will see how to train the CNN network on audio data and use it to label the audio data.

The following code demonstrates the process of labeling audio data using a CNN. The code outlines how to employ a CNN to label audio data, specifically training the model on a dataset of cat and dog audio samples. The goal is to classify new, unseen audio data as either a cat or a dog. Let’s take the cat and dog sample audio data and train the CNN model. Then, we will send new unseen data to the model to predict whether it is a cat or a dog:

  1. Load and pre-process the data: The audio data for cats and dogs is loaded from the specified folder structure using the load_and_preprocess_data function. The load_and_preprocess_data function processes the audio data, converting it into mel spectrograms and resizing them for model compatibility.
  2. Split data into training and testing sets: The loaded and pre-processed...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Data Labeling in Machine Learning with Python
Published in: Jan 2024Publisher: PacktISBN-13: 9781804610541

Author (1)

author image
Vijaya Kumar Suda

Vijaya Kumar Suda is a seasoned data and AI professional boasting over two decades of expertise collaborating with global clients. Having resided and worked in diverse locations such as Switzerland, Belgium, Mexico, Bahrain, India, Canada, and the USA, Vijaya has successfully assisted customers spanning various industries. Currently serving as a senior data and AI consultant at Microsoft, he is instrumental in guiding industry partners through their digital transformation endeavors using cutting-edge cloud technologies and AI capabilities. His proficiency encompasses architecture, data engineering, machine learning, generative AI, and cloud solutions.
Read more about Vijaya Kumar Suda