---
title: "setContext(_:)"
framework: speech
role: symbol
role_heading: Instance Method
path: "speech/speechanalyzer/setcontext(_:)"
---

# setContext(_:)

Sets contextual information to improve or inform the analysis.

## Declaration

```swift
final func setContext(_ newContext: AnalysisContext) async throws
```

## Parameters

- `newContext`: A context object. This object will replace the current object.

## Discussion

Discussion Other analyzer instances may use the same context object.

## See Also

### Managing contexts

- [context](speech/speechanalyzer/context.md)
