Логотип Router Sts

Router Sts

ОрганізаціяПопулярне
GetStream
router-sts

What the speech-to-speech router can be asked for, what each vendor calls it, and what it refuses to fake. Read before adding an STS option or a speech-to-speech provider.

Огляд

ВидавецьGetStream
РепозиторійAgents
Назва навичкиrouter-sts
Зірки
8.2K
Форки
709
Файли в пакеті
Лише інструкції
ЛіцензіяApache-2.0
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Видавець на GitHub: GetStream. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Router Sts у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/GetStream/Agents/tree/main/.claude/skills/router-sts
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/GetStream/Agents.git /tmp/Agents
mkdir -p .claude/skills
cp -r /tmp/Agents/.claude/skills/router-sts .claude/skills/router-sts
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Router Sts в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Router Sts, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Router Sts не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Routing speech to speech

The per-modality half of router-interface. The vocabulary is options.STS; who can express what is declared per model in router.yaml; the contract a provider implements is sts.STS.

One path. A conversation is a socket at /v1/sts/stream, and there is no batch half: every entry is realtime: true. The model on the other end is the voice activity detector, the turn detector, the transcriber and the voice all at once, so nothing in front of it may act as one of them. The caller's audio goes up at 16 kHz mono; the model's comes back at whatever it speaks at, 24 kHz for all of these, under a header that says which reply each chunk belongs to.

The four, and what each calls the same thing

OptionOpenAI gpt-realtime-2xAI grok-voice-think-fast-2.0Alibaba qwen3.5-omni-plus-realtimeGoogle gemini-3.1-flash-live-preview
protocolRealtime events over a socketthe same events; xAI documents it as OpenAI-compatiblethe same events, older spellings keptBidiGenerateContent, the Live API
audio in / out24 kHz / 24 kHz24 kHz / 24 kHz16 kHz / 24 kHz16 kHz / 24 kHz
voiceaudio.output.voice (marin, cedar, …); locked after the first replyvoice (ara, rex, sal, eve, leo)voice (Cherry, …)speechConfig.voiceConfig.prebuiltVoiceConfig.voiceName (Kore, Leda, …)
instructionsinstructions, changeable any timeinstructions, changeableinstructions, set once before the first audiosystemInstruction, set once at setup
turn_detection: server_vadaudio.input.turn_detection.type: server_vadturn_detection.type: server_vadturn_detection.type: server_vadrealtimeInputConfig.automaticActivityDetection, always on
turn_detection: semanticsemantic_vad, with eagerness———
turn_detection: noneturn_detection: null plus manual commitsthe sameturn_detection: nullautomaticActivityDetection.disabled plus activityStart/activityEnd
silence_ms, prefix_padding_mssilence_duration_ms, prefix_padding_msthe samethe samesilenceDurationMs, prefixPaddingMs
thresholdthreshold, a floatthresholdthresholdstartOfSpeechSensitivity / endOfSpeechSensitivity, named levels
interrupt_responseinterrupt_responseinterrupt_response—the model always stops when it hears the caller
input_transcriptaudio.input.transcription: {model}, once, after the stopinput_audio_transcription: {}; restates the turn as it grows, settled by the stopalways on, gummy-realtime-v1inputAudioTranscription: {}, in pieces
output_transcriptalways sent with audioalways sentalways sentoutputAudioTranscription: {}
toolstools: [{type: function, …}], changeablethe same—tools: [{functionDeclarations}], set once; synchronous only
textconversation.item.create + response.createthe same—clientContent with turnComplete: true
imagesconversation.item.create with input_image—input_image_buffer.append, after audio, ≤ 2 fpsrealtimeInput.video, ≤ 1 fps
interrupt from our sideresponse.cancel + conversation.item.truncate at the ms heardthe sameresponse.cancelnothing: the model is not told, the rest of the reply is dropped here
usageresponse.done.usage, audio and text tokens apartnot reportedresponse.done.usageusageMetadata, by modality
session limit60 min——15 min; the connection is cut every ~10 and resumed with a handle

What the table is saying:

  • Three of the four speak one wire. xAI and Alibaba send OpenAI's event names, so internal/sts/openairealtime is one package registered three times, differing in a Vendor value that says how the session frame is spelled and what rate to feed. Gemini is its own package, and shares no code with the transcriber on the same socket on purpose: the transcriber must never reconnect, and a conversation must.
  • Only one of them reads the words. semantic_turns is a term because a caller who asked for it and got a silence timer cannot hear the difference. Nobody here declares manual_turns: the contract has no method for a manual commit yet, and declaring a term the code cannot send is the one thing terms exist to prevent.
  • The threshold has two shapes. A float at three vendors and two named levels at the fourth, so it is not in the shared vocabulary. It goes in overwrites, spelled the way the vendor spells it.
  • What is set once cannot be set again. Gemini and Qwen take instructions and tools at setup. SetInstructions and SetTools return ErrInstructionsFixed and ErrToolsFixed there rather than pretending, and Capabilities.InstructionsMidSession says which is which before a session is opened. Tools that a model takes only at setup travel on the request rather than in the option block, which is why stsrouter.Request and the start frame both carry them.
  • interrupted means one thing. Every vendor reports the caller talking over the reply its own way; the Python plugins turned some of them into two events and had to special-case the duplicate. Here SpeechStarted says only that the model heard someone, and ResponseComplete{Interrupted: true} is the one signal a consumer drops its buffer on. The router session then drops any audio of that generation still arriving, because the model learns of a barge-in a round trip after the caller.
  • Transcripts arrive three ways. OpenAI writes the turn down once, after the caller stops. xAI writes it down about once a second while they talk, each report restating the turn from its beginning, so those are replacement transcripts and the one after the stop is the final, the way the Grok transcriber already works. Gemini sends pieces that add up, settled when the model begins to speak, since its API has no stop event at all.
  • Temperature is not here. Only Nova Sonic, which is not yet a provider, takes it on a live session, and a knob the others ignore in silence is worse than one that is absent.

Model ids drift

gemini-3.1-flash-live-preview replaced gemini-2.5-flash-native-audio-preview-12-2025; the older id still answers but is not what Google points at. gemini-3.8-live has since superseded 3.1 and makes tools non-blocking by default, and gemini-3.8-live-extended-thinking is a separate id, not a setting: it refuses a setup without a thinkingLevel and sends turnComplete with interactionStatus: IN_PROGRESS after a filler, which is not the end of the reply. The table's Gemini column describes 3.1. gpt-realtime-2 is the family; dated snapshots and gpt-realtime-2.1 share its capabilities. grok-voice-3.0 replaced grok-voice-think-fast-2.0 on the same socket and events. Check the Artificial Analysis speech-to-speech board before adding a model: quality and time-to-first-audio move between releases, and the sts-fast pin follows them.

What the router refuses to fake

Options become Terms(), and only models whose supports: lists every term asked for are candidates. A term nothing can serve is a 400 naming it, not a session that quietly lacks it. images is not a term: it is an input modality, gated by input_modalities: [image] the way vlm gates a text model, and sts-vision is the alias that requires it. full_duplex means a model can receive caller audio while producing its own audio; realtime transport or asynchronous tools alone do not establish it.

supports: is a promise about the Go code, checked twice. stsrouter.New walks the config at boot against each provider package's CapabilitiesFor and refuses an entry that promises what the package cannot send; the routing core's Validate hook asks the same of the provider actually built, for a build that registered something the tables do not know.

Voices are not resolved against the voice catalogue. None of these models takes a cloned voice, so a custom: name is refused up front rather than looked up at every candidate.

Billing

One row per reply, settled by ResponseComplete. AudioMs is the caller's audio the session forwarded since the last reply, which is the unit a transcriber bills by and the one number every vendor lets us count ourselves. Tokens are what the vendor reported: the totals in the row's columns, and the split by modality on sts.Usage, which the session writes into meters (each input modality net of its cached part). A split replaces the totals in the price, so OpenAI Realtime and Gemini Live are priced by the rates their prices/vendor.json entries give each modality, and a vendor that reports no split by its per-token rates on the totals. A provider that fills the split must put every billed token in it, since whatever it leaves out is not priced: Gemini bills its details, so what they leave out of the prompt is only shown, as attributes.prompt_tokens_not_in_details, and what they leave out of the response is billed as text. Thinking goes in ReasoningTokens, shown as attributes.reasoning_tokens and never priced on its own.

Adding an option

  1. A field on options.STS, with Merge, Validate and, if it is optional behaviour, a Term and a line in Terms(). Pointers, so "say nothing" and "turn this off" stay different.
  2. The same field on StsOptions, on its Go struct in internal/api. Then run go run ./cmd/openapi and regenerate all five sides.
  3. A field on sts.Capabilities and a case in Expresses, so a config can only declare it for a model whose package reports it.
  4. Read it in each provider that can express it, refuse it where the vendor has no such thing, and declare it in supports:.
  5. A test that a provider which cannot express it refuses rather than drops it.

Adding a provider

One package under internal/sts, implementing sts.STS, with a CapabilitiesFor(model) table the router can read before a session exists. Three test files: a no-network handleMessage test fed the vendor's own frames, a fake-socket test asserting the setup frame and the interrupt on the wire, and an integration_test.go embedding stssuite.Suite, which speaks mia.mp3 at the model and holds it to an accurate transcript, audio at the declared rate, a clean barge-in, a typed turn, a tool round and an honest answer about mid-session instructions. Register it in stsrouter/registry.go and add its capabilitiesFor case, then declare it in router.yaml with a data_policy, which every model that hears the caller must have.

Поширені запитання

Що робить навичка ШІ Router Sts?

What the speech-to-speech router can be asked for, what each vendor calls it, and what it refuses to fake. Read before adding an STS option or a speech-to-speech provider.

Навіщо використовувати Router Sts у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Router Sts — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Router Sts у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/GetStream/Agents/tree/main/.claude/skills/router-sts. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Router Sts?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Router Sts?

Зі скількома забажаєте. У TypingMind ви можете використовувати Router Sts із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Router Sts?

Так. На GitHub цю навичку публікує GetStream за ліцензією Apache-2.0. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇