func startRecording() async {
   finalText = AttributedString("")
   partialText = AttributedString("")

   do {
      // Check authorization to access Microphone
      if AVCaptureDevice.authorizationStatus(for: .audio) != .authorized {
         guard await AVCaptureDevice.requestAccess(for: .audio) else { return }
      }
      // Set up audio session
      let audioSession = AVAudioSession.sharedInstance()
      try audioSession.setCategory(.playAndRecord, mode: .spokenAudio)
      try audioSession.setActive(true, options: .notifyOthersOnDeactivation)

      // Set up transcriber
      await setTranscriber()

      // Process audio stream
      for await buffer in try await audioStream() {
         if let inputBuilder = inputBuilder, let analyzerFormat = analyzerFormat {
            if let converted = try convertBuffer(buffer: buffer, format: analyzerFormat) {
               let input = AnalyzerInput(buffer: converted)
               inputBuilder.yield(input)
            }
         }
      }
   } catch {
      print("Error \(error)")
   }
}