DoreSoundPlay

 

Getting Started

The following instructions will guide you on how to implement the DoreSoundPlay SDK on a IOS platform.

Technical Specifications:

Xcode  14.2 or Above
IOS Version 13.0 or Above
Supported Device iPhoneSE or Above

 

You can implement DoreSoundPlay SDK in your existing/new IOS Xcode project with in just 3 Steps

Step 1:

 1. Add this line in your pod file  

pod 'DoreSoundPlay'

2. Run pod install, and open project

pod install

3. Cocoapod version should be 1.12.1 or above 

   

 

Step 2: 

Initiate DoreSoundPlay Manager

private var modelManager: SoundPlayManager?

modelManager = SoundPlayManager()
modelManager?.delegate = self
        
let isValid:Bool = (modelManager?.init_data(licKey: "insert your license key here"))!
 if(!isValid){
    print("Dore : Lic not valid")
        return
  }
        

 

Step 3:

use "SoundPlayDelegate" to get callback

class SoundPlayVC : UIViewController,  SoundPlayDelegate {

Start audio engine with audio analyzer

 private func startAudioEngine() {
        
        modelManager?.soundplay_model(analyzer: analyzer)
        
        audioEngine.inputNode.installTap(onBus: 0, bufferSize: 8000, format: inputFormat) { buffer, time in
            self.analysisQueue.async {
                self.analyzer.analyze(buffer, atAudioFramePosition: time.sampleTime)
            }
        }
        
        do{
            try audioEngine.start()
        }catch( _){
            print("error in starting the Audio Engin")
        }
    }
    

Get result callback from "onSoundPlayReceived"

Recognition info string values - "idle", "whistle", "clap", "snap", "malevoice", "femalevoice"

  func onSoundPlayReceived(_ info: String) {
        DispatchQueue.main.async {
            self.lbResult.text = info
        }
    }