> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 (current TTS) and Pulse (current
> STT). Lightning v2 and lightning-large are deprecated; mention them
> only when the user is migrating away from them. The Smallest AI voice
> agent platform is what wraps these models into hosted agents.

# Pulse STT `close_stream` signal

> Send {'type': 'close_stream'} to end a Pulse STT session.

Send `{"type": "close_stream"}` to end a Pulse STT session. The server flushes remaining audio, emits final transcripts, responds with `is_last=true`, then closes the WebSocket.

`{"type": "finalize"}` is now documented as a mid-session flush: it returns an `is_final=true` transcript for buffered audio while keeping the session open for more input. Prior docs conflated the two.

Code examples in Python, Node.js, and browser JavaScript were updated to use `close_stream` when ending the stream.

→ [Pulse STT realtime quickstart](/models/speech-to-text/realtime-web-socket/quickstart)