Scenes & LLM
Concepts
Section titled “Concepts”Raw text from ASR may contain filler words, typos, or formatting issues. Scenes define a prompt that tells an LLM how to rewrite the text.
ASR raw text → [Scene prompt + LLM] → Rewritten textCore relationships:
- A scene is a configuration: prompt (instruction) + bound LLM provider + model
- An LLM provider is an OpenAI-compatible API endpoint (e.g. Ollama, Groq, OpenAI)
- An LLM adapter is an optional local bridge process that wraps a non-standard local model into an OpenAI-compatible API for a provider to point to
In short: the scene decides “how to rewrite”, the LLM provider decides “who rewrites”, the adapter solves “incompatible API”.
When LLM rewriting is not needed, use the built-in __raw__ scene — recognition results go directly to input.
Scenes
Section titled “Scenes”Concept
Section titled “Concept”Each scene contains:
| Field | Description |
|---|---|
id | Unique identifier |
label | Display name in the menu |
prompt | System prompt sent to the LLM |
provider_id | Bound LLM provider |
model | Model name to use |
candidate_count | Number of candidates to return |
LLM is only invoked when provider_id + model + prompt are all configured.
Built-in scenes:
__raw__— Bypasses LLM, outputs raw recognition text__command__— Used by command mode (see below)
Switch scenes at runtime with Shift_R.
Corresponding config:
{ "scenes": { "active_scene": "__raw__", "definitions": [ { "id": "__raw__", "candidate_count": 0 }, { "id": "default", "label": "Default", "prompt": "Correct ASR errors, keep original meaning...", "provider_id": "groq", "model": "openai/gpt-oss-120b", "candidate_count": 5 } ] }}In Vinput GUI, manage scenes in the LLM tab: add, edit prompt, bind provider and model.
vinput scene list # List all scenesvinput scene add --id <id> # Add a scenevinput scene edit <id> # Edit a scenevinput scene use <id> # Switch active scenevinput scene remove <id> # Remove a sceneWhen adding a scene with LLM, --provider, --model, and --prompt must all be provided.
LLM providers
Section titled “LLM providers”Concept
Section titled “Concept”An LLM provider is an OpenAI-compatible API endpoint. Scenes reference it via provider_id.
You can configure multiple providers — different scenes can bind to different providers.
Corresponding config:
{ "llm": { "providers": [ { "id": "groq", "base_url": "https://api.groq.com/openai/v1", "api_key": "your-api-key" } ] }}Setup example
Section titled “Setup example”Using local Ollama:
vinput llm add ollama --base-url http://127.0.0.1:11434/v1vinput scene add --id polish \ --label "Polish" \ --provider ollama \ --model qwen2.5:7b \ --prompt "Rewrite the recognized text into polished Chinese."vinput scene use polishvinput llm list # List configured providersvinput llm add <id> --base-url <url> # Addvinput llm edit <id> --base-url <url> # Editvinput llm remove <id> # RemoveLLM adapters
Section titled “LLM adapters”Concept
Section titled “Concept”If your local model does not provide an OpenAI-compatible API directly, install an LLM adapter. An adapter is a local process that wraps the model into an OpenAI-compatible API, then you point your LLM provider’s base_url to it.
Corresponding config:
{ "llm": { "adapters": [] }}In Vinput GUI, go to Resources → LLM Adapters to browse and install.
vinput adapter list # List installed adaptersvinput adapter list -a # List available remote adaptersvinput adapter add <id> # Installvinput adapter start <id> # Startvinput adapter stop <id> # StopCommand mode
Section titled “Command mode”Concept
Section titled “Concept”Command mode is a special scene usage: select existing text, then use a voice instruction to have LLM rewrite it.
Flow: select text → hold Control_R → speak your instruction → release → done.
Under the hood it uses the built-in __command__ scene, whose prompt template is concatenated with your spoken instruction at runtime.
Examples:
- Select Chinese text → say “translate to English” → replaced with translation
- Select code → say “add comments” → replaced with commented version
If there is no surrounding-text selection, it falls back to primary-selection clipboard content.
Command mode requires an LLM provider to be configured, with
provider_idandmodelbound in the__command__scene.