         speakRecordButton.setTitle(rwf.isRecording() ? "Stop" : "Record", for: UIControlState.normal)
     }
     
-    @IBAction func speakPlay(sender: UIButton) {
+    @IBAction func speakPlay(_ sender: UIButton) {
         speakProgress.setProgress(0, animated: false)
         let rwf = RWFramework.sharedInstance
         rwf.stop()

        let path = Bundle.main.path(forResource: "RWFramework", ofType: "plist")
        let info  = NSDictionary(contentsOfFile: path!) as! [String:AnyObject?]
        rwf.setProjectId(project_id: String(describing: info["project_id"]))

    }


    }
    
    func rwRecordingProgress(percentage: Double, maxDuration: TimeInterval, peakPower: Float, averagePower: Float) {
        print("Recording progress")
        speakProgress.setProgress(Float(percentage), animated: true)
    }
    
    func rwPlayingBackProgress(percentage: Double, duration: TimeInterval, peakPower: Float, averagePower: Float) {
        print("Playback progress")
        speakProgress.setProgress(Float(percentage), animated: true)
    }
    
    func rwAudioRecorderDidFinishRecording() {
        let rwf = RWFramework.sharedInstance
        print("Finished recording")
        speakRecordButton.setTitle(rwf.isRecording() ? "Stop" : "Record", for: UIControlState.normal)
        speakProgress.setProgress(0, animated: false)
    }
    
    func rwAudioPlayerDidFinishPlaying() {
        let rwf = RWFramework.sharedInstance
        print("Finished playing")
        speakPlayButton.setTitle(rwf.isPlayingBack() ? "Stop" : "Play", for: UIControlState.normal)
        speakProgress.setProgress(0, animated: false)
    }
    
    func rwGetProjectsIdTagsSuccess(data: NSData?) {
        print("Tags received")
        let dict = JSON(data: data! as Data)
        let tagsArray = dict["tags"]
        for (_, dict): (String, JSON) in tagsArray {
            let value = dict["value"]
            print("\(value)")
        }
    }
    func rwGetProjectsIdUIGroupsSuccess(data: NSData?) {
        print("UI Groups received")
        let dict = JSON(data: data! as Data)
        let uiGroupsArray = dict["ui_groups"]
        for (_, dict): (String, JSON) in uiGroupsArray {
            let header_text_loc = dict["header_text_loc"]
            print("\(header_text_loc)")
        }
    }
}
