# Changelog

> New endpoints, improvements, and API changes to Munsit — newest first.

August 14, 2026

## Word timestamps for Text to Speech

-   **New** New `POST /api/v1/text-to-speech/{model_id}/with-timestamps` returns speech together with character-level timings for the text you submitted. Use it to highlight words as they are spoken, drive captions, or align a transcript to the audio.
-   The response is NDJSON — one JSON object per line. Audio lines carry base64 PCM16 in `audio_base64`; the final lines carry `alignment` (aligned to your original text) and `normalized_alignment` (aligned to the engine's normalized form). Concatenating `characters` reproduces your input exactly, so array indices map straight back onto your string.
-   Break tags are supported in the text you send: `<break time="3s"/>` and `<break time="500ms"/>` insert a pause of the given length.
-   **API** Timings are emitted once generation finishes, not incrementally with each audio chunk. To highlight from the first word, buffer the full response before playback or request long text sentence by sentence.
-   Requires a model served by the v1.5 engine. Other models return `400` with `Word timestamps are not available for model '…'`. Pricing, wallet deduction, and history are identical to a standard synthesis request — timestamps cost nothing extra.

July 27, 2026

## Streaming finalization on the legacy STT socket

-   **New** Send `{"event":"end_of_stream"}` to transcribe any remaining buffered audio, at any duration. The server replies with a `transcription` carrying `isFinal: true`, then a `finalized` event with the complete transcript. Closing the socket does not flush buffered audio — send this first.
-   `transcription` events now carry an `isFinal` boolean. Clients reading only `data` are unaffected.
-   New `min_buffer_seconds` query parameter controls how much audio accumulates before an interim result is emitted. Default `0.5`, range `0.1`–`5.0`.
-   **Fixed** Utterances shorter than roughly 1.7 seconds could complete with no transcript and no error. The audio buffer was measured before each incoming chunk was appended, and the first chunk was never evaluated, so short answers never reached the recognizer.
-   Rapid audio frames arriving during connection setup could each start their own initialization, discarding the WAV metadata from the first frame. Every subsequent frame then failed with `Not a valid WAV file (missing RIFF header)` for the life of the connection. Clients sending 10–20 ms frames were affected on every session.
-   **Deprecated** `WS /websocket/speech-to-text` remains deprecated and receives no new recognition features. New integrations should use `WS /api/v1/listen`.

July 24, 2026 v1

## New capabilities

-   **New** New Text-to-Speech capabilities.
-   New Speech-to-Text capabilities.
