Archived
- video: MiniMax-H3 and FastVideo's FastH3 8-Step V2, a video with its stereo soundtrack from text on OpenAI's /v1/videos, block fp8 on two cards - music: MiniMax-Music3, songs from lyrics and a description on /v1/audio/speech - speech: Breeze-TTS-2 on /v1/audio/speech and vLLM-Omni's realtime WebSocket - runtime LoRA adapters beside the base model, picked per request by `model` (baKon, #105) - several agent streams keep their cached history: --checkpoint-slots auto, the new default, sizes the snapshot store by --max-num-seqs (#108) - the Swift 1.5 27B W4 releases convert and serve: compressed-tensors AWQ and GPTQ int4, AutoRound, ModelOpt NVFP4 (#110) - the image's host tests pass where perf_event_open is refused, as in BuildKit's sandbox (#106) - plugin ABI 21: out-of-tree plugins must be rebuilt
36 lines
1.7 KiB
C++
36 lines
1.7 KiB
C++
/* text_split.h -- text that arrives in pieces, cut into the units a speech model reads one at a
|
|
* time: sentences, or clauses (text_split.cpp).
|
|
*
|
|
* The realtime speech session (speech_stream.cpp) is sent text as a client produces it, a language
|
|
* model's tokens or a typist's keystrokes, and speaks each unit as soon as it is complete, so the
|
|
* first audio does not wait for the whole text. A unit is complete once the text after its closing
|
|
* punctuation shows that it ended; the end of the input ends the last one.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace rad {
|
|
namespace server {
|
|
|
|
enum class TextSplit {
|
|
None, /* no cutting: the whole input is one unit */
|
|
Sentence, /* after . ! ? and their CJK, Indic and Arabic forms */
|
|
Clause, /* also after , ; and their full-width and Arabic forms */
|
|
};
|
|
|
|
/* The complete units at the front of `*pending`, trimmed, in order; `*pending` keeps the rest.
|
|
* With `final` (the input has ended) the rest is a unit too and `*pending` is left empty.
|
|
*
|
|
* A unit ends at its closing punctuation together with any run of punctuation and closing quotes
|
|
* or brackets after it ("Really?!", "he said.”"). After ASCII punctuation the end needs
|
|
* whitespace to follow, so "3.14" and "a.b" do not end one; after full-width, CJK, Indic or Arabic
|
|
* punctuation any next character does, since those scripts put no space there. A full stop after a
|
|
* common abbreviation (Dr., Mr., e.g., etc.) or an initial (J., J.R.) ends nothing. A unit with
|
|
* nothing to say (only punctuation) is dropped. */
|
|
std::vector<std::string> take_text_units(std::string* pending, TextSplit mode, bool final);
|
|
|
|
} /* namespace server */
|
|
} /* namespace rad */
|