         
         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") })
+    }
+
 
     
 }

    // Text to Speech Service
    private let service = TextToSpeech()
    
    // Phrase used for testing
    let testString = "All the problems of the world could be solved if men were only willing to think."
    
    let germanString = "Alle Probleme der Welt könnten gelöst werden, wenn Männer waren nur bereit, zu denken."
    
    /// Timeout for an asynchronous call to return before failing the unit test
    private let timeout: NSTimeInterval = 20.0

                    let audioPlayer = try AVAudioPlayer(data: data)
                    audioPlayer.prepareToPlay()
                    audioPlayer.play()
    
                    if (self.playAudio) {
                        sleep(10)
                    }
                    
                    synthPlayExpectation.fulfill()
                    
