  **/
 
 import Foundation
+import Starscream
 
 /** Abstracts the WebSockets connection to the Watson Speech to Text service. */
-class SpeechToTextWebSocket: WatsonWebSocket {
-
-    private var results: [SpeechToTextResult]
+class SpeechToTextWebSocket: WebSocket {
+
+    private let authStrategy: AuthenticationStrategy
     private let failure: (NSError -> Void)?
     private let success: [SpeechToTextResult] -> Void
+    private var results = [SpeechToTextResult]()
+    private let operations = NSOperationQueue()
+    private var retries = 0
+    private var maxRetries = 2
 
     /**
      Create a `SpeechToTextWebSocket` object to communicate with Speech to Text.

     - parameter wrapper: A `SpeechToTextResultWrapper` that encapsulates the new or updated
        transcriptions along with state information to update the internal `results` array.
     */
    private func onResults(wrapper: SpeechToTextResultWrapper) {
        updateResultsArray(wrapper)
        success(results)
    }

    /**
     Update the `results` array with new or updated transcription results from Speech to Text.

     - parameter wrapper: A `SpeechToTextResultWrapper` that encapsulates the new or updated
        transcriptions along with state information to update the internal `results` array.
     */
    private func updateResultsArray(wrapper: SpeechToTextResultWrapper) {
        var localIndex = wrapper.resultIndex
        var wrapperIndex = 0
        while localIndex < results.count {

            results.append(wrapper.results[wrapperIndex])
            wrapperIndex = wrapperIndex + 1
        }

        success(results)
    }

    /*
