         
         waitForExpectationsWithTimeout(timeout, handler: { error in XCTAssertNil(error, "Timeout") })
     }
+    
+    /**
+     Uses the AVAudioPlayer to play the WAV file using SSML advanced features.
+     */
+    func testSynthAndPlaySSML() {
+        
+        let synthPlaySSMLExpectation = expectationWithDescription("Synthesize Audio")
+        
+        
+        
+        
+        service.synthesize(ssmlString, oncompletion: {
+            data, error in
+            
+            if let data = data {
+                
+                do {
+                    let audioPlayer = try AVAudioPlayer(data: data)
+                    audioPlayer.prepareToPlay()
+                    audioPlayer.play()
+                    
+                   if (self.playAudio) {
+                        sleep(10)
+                    }
+                    
+                    synthPlaySSMLExpectation.fulfill()
+                    
+                    
+                } catch {
+                    XCTAssertTrue(false, "Could not initialize the AVAudioPlayer with the received data.")
+                }
+                
+            }
+            
+        })
+        
+        waitForExpectationsWithTimeout(timeout, handler: { error in XCTAssertNil(error, "Timeout") })
+    }
+
 
     
 }

                    let audioPlayer = try AVAudioPlayer(data: data)
                    audioPlayer.prepareToPlay()
                    audioPlayer.play()
                    
                    // Uncomment the line below to allow the test time to play the
                    // audio through the speakers.
                    
                    // sleep(10)
                    
                    synthPlayExpectation.fulfill()
                    

                    audioPlayer.prepareToPlay()
                    audioPlayer.play()
                    
                   if (self.playAudio) {
                        sleep(10)
                    }
                    
                    playExpectation.fulfill()
                    
