Overview
The voice server is started withmoorcheh-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.Fixed recording length in seconds. When set, disables silence detection.
When
true (and seconds is omitted), stop recording after a pause in speech.Maximum recording length when using silence detection (3–60).
POST /speak
Synthesize and play text on the device speaker.Text to speak.
POST /ask/stream
Stream a RAG answer as Server-Sent Events. Embeds the query on the edge device whenquery_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).
Question text.
Optional precomputed embedding. When omitted, the server embeds locally with BGE-small-en-v1.5 (384-dim).
Passages to retrieve for context.
When
true, filters passages below threshold.Minimum search score when
kiosk_mode is true.Optional system instruction for RAG.
Optional instruction before the question.
Prior turns:
[{"role": "user"|"assistant", "content": "..."}].When
true, speak the full answer on the device after streaming completes.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.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 (unlessquery is provided), embed locally, call POST /answer on Moorcheh Edge, and speak the reply on the device.
/ask/voice is an alias for /ask.
When set, skip mic capture and use this text as the question.
Fixed recording length when
query is omitted.Stop recording after a pause when
seconds is omitted.Maximum recording length for silence detection.
Passages to retrieve for context.
Filter low-scoring passages when
true.Minimum score when
kiosk_mode is true.Optional system instruction.
Optional instruction before the question.
Prior conversation turns.
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).
Stable document id (used in chunk ids and
[meta] headers).Document category (e.g.
menu, policy).Display title for the document.
Full document body to chunk and embed. Alias:
body.Tags as a JSON array or comma-separated string.
Edge item ids to delete before upload (replaced chunks after an edit). Alias:
orphan_ids.