     private var socket: SpeechToTextWebSocket?
     private var captureSession: AVCaptureSession?
 
+    /**
+     Create a `SpeechToTextAudioStreamer` to stream microphone audio to Speech to Text.
+
+     - parameter authStrategy: An `AuthenticationStrategy` that defines how to authenticate
+        with the Watson Developer Cloud's Speech to Text service. The `AuthenticationStrategy`
+        is used internally to obtain tokens, refresh expired tokens, and maintain information
+        about authentication state.
+     - parameter settings: The configuration for this transcription request.
+     - parameter failure: A function executed whenever an error occurs.
+     - parameter success: A function executed with all transcription results whenever
+        a final or interim transcription is received.
+     
+     - returns: A `SpeechToTextAudioStreamer` object that can stream microphone audio to
+        Speech to Text.
+    */
     init?(
         authStrategy: AuthenticationStrategy,
         settings: SpeechToTextSettings,

import Foundation
import AVFoundation

class SpeechToTextAudioStreamer: NSObject, AVCaptureAudioDataOutputSampleBufferDelegate {

    private var settings: SpeechToTextSettings

        self.socket = socket
    }

    /**
     Start streaming microphone audio to Speech to Text.

     - returns: `true` if the `AVCaptureSession` could be configured to stream microphone audio
        to the Speech to Text service; false, otherwise.
     */
    func startStreaming() -> Bool {

        settings.contentType = .L16(rate: 44100, channels: 1)
