Giter VIP home page Giter VIP logo

star-wars-sound-classifier's Introduction

Star Wars Sound Classifier

This iOS app classifies the lightsaber and R2D2 sounds from Star Wars from the microphone input.

Purpose

The purpose of creating this project is to learn a Create ML and Sound Analysis framework in practice.

How to run the app

Because the app uses mic input, it works only on the device. There might be a way to set up the app to work on a Simulator, but it is out of the scope of this project. The main focus is to learn how to use Create ML and Sound Analysis framework in practice.

To run the app:

  1. Clone the repo
  2. Configure code signing
  3. Run the app on the device

After the app is launched, start your favorite Star Wars movie, tap on the Play button, and observe the results:

Home screenLightsaberR2D2

Create ML

Preparing audio sounds

The Core ML model was trained in the Create ML (Version 5.0 Beta (119)) using sounds from YouTube videos and from the website http://www.galaxyfaraway.com.

Sounds were grouped into 3 folders:

Screenshot 2023-08-05 at 11 38 12 AM

We need to provide a variety of different sounds other ones we want to classify (lightsaber and R2D2) to properly train the model.

Training

The training was performed with default settings:

Screenshot 2023-08-05 at 11 36 50 AM

What's left outside of the scope

  • The app doesn't work on Simulator
  • The app doesn't handle audio interruptions (for example incoming phone calls during sound analysis)

References

Technical

  • Apple's "Classifying Live Audio Input with a Built-in Sound Classifier" sample project (link). This project is a great sample on how to detect different sounds using built-in sound classifications. In addition, it has a code to properly handle audio interruptions and a neat SwiftUI meter view that was copied into this project.
  • WWDC video "Training Sound Classification Models in Create ML" (link)
  • Apple's article "Classifying Sounds in an Audio Stream" (link)

Non-technical

star-wars-sound-classifier's People

Contributors

derpoliuk avatar

Stargazers

 avatar

Watchers

 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.