Skip to main content

Overview

The voice server is started with moorcheh-edge voice serve. It runs on Linux edge hardware (for example Arduino UNO Q) and exposes mic, speaker, and RAG endpoints over HTTP. It is not part of the Moorcheh Edge Docker container (:8080). RAG calls are proxied to Moorcheh Edge on the same device (default http://127.0.0.1:8080).
Run moorcheh-edge voice setup once before starting the server.

GET /health

Check that the voice server is running.

POST /listen

Record from the device mic and return transcribed text.
number
Fixed recording length in seconds. When set, disables silence detection.
boolean
default:"true"
When true (and seconds is omitted), stop recording after a pause in speech.
number
default:"30"
Maximum recording length when using silence detection (3–60).

POST /speak

Synthesize and play text on the device speaker.
string
required
Text to speak.

POST /ask/stream

Stream a RAG answer as Server-Sent Events. Embeds the query on the edge device when query_vector is omitted; otherwise uses the vector you supply. Proxies POST /answer/stream on Moorcheh Edge. When speak: true, streams answer tokens to the remote UI immediately and starts TTS after the full answer is ready (one Piper pass on the device speaker).
string
required
Question text.
array
Optional precomputed embedding. When omitted, the server embeds locally with BGE-small-en-v1.5 (384-dim).
number
default:"5"
Passages to retrieve for context.
boolean
default:"true"
When true, filters passages below threshold.
number
default:"0.25"
Minimum search score when kiosk_mode is true.
string
Optional system instruction for RAG.
Optional instruction before the question.
array
Prior turns: [{"role": "user"|"assistant", "content": "..."}].
boolean
default:"false"
When true, speak the full answer on the device after streaming completes.
boolean
default:"true"
When speak is true, play the cached kiosk holding welcome audio in parallel with RAG. Pre-generate with moorcheh-edge voice cache-holding - see Retail Kiosk: kiosk audio cache.
boolean
default:"true"
When speak is true, loop the ambient thinking WAV until answer tokens arrive (after holding). Pre-generate with moorcheh-edge voice cache-thinking - see Retail Kiosk: kiosk audio cache. Disable globally with MOORCHEH_THINKING_SOUND=0.

SSE events

Inherits Moorcheh Edge events from Answer stream: Additional events when speak: true: TTS continues in the background after the HTTP stream closes; the connection does not wait for playback to finish.

POST /ask and POST /ask/voice

Full voice loop: record from mic (unless query is provided), embed locally, call POST /answer on Moorcheh Edge, and speak the reply on the device. /ask/voice is an alias for /ask.
string
When set, skip mic capture and use this text as the question.
number
Fixed recording length when query is omitted.
boolean
default:"true"
Stop recording after a pause when seconds is omitted.
number
default:"30"
Maximum recording length for silence detection.
number
default:"5"
Passages to retrieve for context.
boolean
default:"true"
Filter low-scoring passages when true.
number
default:"0.25"
Minimum score when kiosk_mode is true.
string
Optional system instruction.
Optional instruction before the question.
array
Prior conversation turns.
boolean
default:"true"
When true, play the answer on the device speaker.

POST /catalog/document

Chunk a catalog document, embed on the device, and upload vectors to Moorcheh Edge on the same board. Used by the retail kiosk Admin when saving documents (MOORCHEH_VOICE_PROXY_URL).
string
required
Stable document id (used in chunk ids and [meta] headers).
string
required
Document category (e.g. menu, policy).
string
required
Display title for the document.
string
required
Full document body to chunk and embed. Alias: body.
array | string
Tags as a JSON array or comma-separated string.
array
Edge item ids to delete before upload (replaced chunks after an edit). Alias: orphan_ids.

Errors