Getting Started

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

Technical Specifications:

Xcode  11.3 or Above
IOS Version 13.0 or Above
Supported Device iPhone6s 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. If xcode version 12 or above, Select "Target" - > "General" -> "Framework" Click plus (Add) icon and choose Framework "DoreCoreAI.xcframework". make sure to select "Embed & Sign" option  



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"))!
    print("Dore : Lic not valid")


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)
            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