StreamingSession (and StreamingSessionSTS for NimbusSTS).
This page is the Python API. Chunk-size guidelines, when to stream vs batch, and aggregation policy live on Streaming inference configuration. For app-facing decisions on frozen encoders, prefer Personalizer and BrainState.
Supported heads
Basic loop
process_chunk returns a per-chunk result (prediction, confidence, posterior, …). finalize_trial aggregates chunks for the trial; reset clears session state.
Aggregation methods
Passmethod= to finalize_trial. Defaults and when to pick each method are documented on Streaming inference configuration.
Temporal aggregation
When chunks still have a time axis,BCIMetadata.temporal_aggregation reduces them before classification (for example "logvar" for CSP). Choose the feature type and aggregation on the config page; the Python session reads them from BCIMetadata.
Bridge to BrainState
Convert a finalizedStreamingResult for device / UI decisions:
BrainState for apps; keep StreamingResult for research diagnostics. See BrainState.
StreamingSessionSTS
For non-stationary sessions, useNimbusSTS with StreamingSessionSTS so latent state propagates across chunks:
partial_fit on trial-level features (your pipeline aggregates chunks). For STS state APIs and when to prefer STS, see Bayesian STS.
API notes
- Chunk shape must match
(metadata.n_features, metadata.chunk_size). - Always
reset()between trials so posteriors do not leak. - Quality gates (confidence / entropy thresholds) are application policy — see Streaming inference configuration and BrainState presets.
Next read
Streaming configuration
Chunk size, aggregation policy, quality gates
BrainState
App-facing intents, presets, and bridges
API Reference
Full symbol reference
Real-time setup
LSL, BrainFlow, and acquisition loops