Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.39 KB

10051.md

File metadata and controls

38 lines (26 loc) · 1.39 KB
contributors
rogerluan

Intro

  • ShazamKit is a framework that can bring audio recognition into your apps.
  • You can match against Shazam's music catalogs, or your own custom prerecorded audios.

Overview

ShazamKit match flow

Thus, the implementation overview is rather simple:

  1. Ask for microphone permission from the user.
  2. Start recording.
  3. Pass the recorded audio buffers to ShazamKit.
  4. Handle the results from ShazamKit.

New this year

  • SHManagedSession: automatically handles recording, removing the hassle of setting up audio buffers, managing the recording session, and checking for microphone permission (although microphone permission is still required).

  • You can call prepare() to start prerecording ahead of time, so matches return faster when asked.

  • SHManagedSession has 3 states:

    • idle: the session has completed a single match result, or was cancelled, or terminated async sequence of results.
    • prerecording: prepare() was called.
    • matching: session is making at least 1 match attempt.
  • SHLibrary: add media items to the Shazam library, list the items you (and not any other app!) have added, and delete them.

Related Sessions