             settings.timestamps = true
             settings.filterProfanity = false
             settings.speakerLabels = true
-            
+
             speechToText.recognize(audio: audio, settings: settings, model: "en-US_NarrowbandModel", learningOptOut: true, failure: failWithError) { results in
-                self.validateSTTSpeakerLabels(speakerLabels: results.speakerLabels)
-                expectation.fulfill()
+                if !expectationFulfilled && results.speakerLabels.count > 0 {
+                    self.validateSTTSpeakerLabels(speakerLabels: results.speakerLabels)
+                    expectationFulfilled = true
+                    expectation.fulfill()
+                }
             }
             waitForExpectations()
         } catch {

    {
        let description = "Transcribe an audio file."
        let expectation = self.expectation(description: description)
        
        let bundle = Bundle(for: type(of: self))
        guard let file = bundle.url(forResource: filename, withExtension: withExtension) else {

    }
    
    func validateSTTSpeakerLabels(speakerLabels: [SpeakerLabel]) {
        XCTAssertGreaterThan(speakerLabels.count, 0)
        for speakerLabel in speakerLabels {
            validateSTTSpeakerLabel(speakerLabel: speakerLabel)
        }
