<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Speech",
  "identifier" : "/documentation/Speech/SpeechAnalyzer/finish(after:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "s:6Speech0A8AnalyzerC6finish5afterySo6CMTimea_tYaKF"
  },
  "title" : "finish(after:)"
}
-->

# finish(after:)

Finishes analysis once input for a given time is consumed.

```
final func finish(after: CMTime) async throws
```

## Parameters

`after`

An audio time marking the end of the analysis session.

## Discussion

In most cases, you can call [`finalizeAndFinish(through:)`](/documentation/Speech/SpeechAnalyzer/finalizeAndFinish(through:)) or [`cancelAndFinishNow()`](/documentation/Speech/SpeechAnalyzer/cancelAndFinishNow()) instead. Those methods also finish analysis.

At the return of this method, the modules’ result streams will have ended and the modules will not accept further input from the input sequence. The analyzer will not be able to resume analysis with a different input sequence and will not accept module changes; most methods will do nothing.

Analysis of input up to and including the given time may or may not have been completed. Modules will not publish *additional* results to their streams, but the application can read any results the modules have *already* published. To ensure analysis is completed or skipped before finishing, call [`finalize(through:)`](/documentation/Speech/SpeechAnalyzer/finalize(through:)) or [`cancelAnalysis(before:)`](/documentation/Speech/SpeechAnalyzer/cancelAnalysis(before:)).

You do not need to call this method before releasing this analyzer or its modules.

> Throws: `CancellationError` if analysis is finished early before the given input time.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)