> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moorcheh.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# moorcheh-edge voice ask

> Record a question, run RAG, and speak the answer on device.

## Synopsis

```bash theme={null}
moorcheh-edge voice ask [options]
```

Embeds the question locally (BGE-small-en-v1.5, 384-dim), calls **`POST /answer`** on Moorcheh Edge, and optionally plays the reply with Piper TTS.

<Note>
  Run `moorcheh-edge up --with-llm` first so Ollama and the answer model are available. Run [`voice setup`](/cli/voice/setup) once before first use.
</Note>

## Options

| Flag                  | Default                 | Description                                                        |
| --------------------- | ----------------------- | ------------------------------------------------------------------ |
| `--base-url`          | `http://localhost:8080` | Moorcheh Edge API base URL                                         |
| `--query`             | -                       | Skip STT and use this text as the question                         |
| `--seconds`           | `5`                     | Recording length when `--query` is omitted                         |
| `--capture-device`    | -                       | ALSA capture device for recording                                  |
| `--playback-device`   | -                       | ALSA playback device for TTS                                       |
| `--top-k`             | `5`                     | Passages to retrieve for context                                   |
| `--threshold`         | `0.0`                   | Minimum score when `--kiosk-mode` is set                           |
| `--kiosk-mode`        | off                     | Filter low-scoring passages                                        |
| `--header-prompt`     | -                       | Custom system instruction                                          |
| `--footer-prompt`     | -                       | Instruction before the question                                    |
| `--chat-history-json` | -                       | Prior turns as JSON array                                          |
| `--temperature`       | server default          | LLM temperature 0.0–2.0                                            |
| `--timeout`           | `120`                   | HTTP timeout in seconds                                            |
| `--no-speak`          | off                     | Print answer only; do not play TTS                                 |
| `--json`              | off                     | Print full API JSON plus `heard`; still speaks unless `--no-speak` |

## Examples

```bash theme={null}
moorcheh-edge voice ask --kiosk-mode --query "What are your hours?"
moorcheh-edge voice ask --kiosk-mode --threshold 0.3 --top-k 2
moorcheh-edge voice ask --query "Do you have oat milk?" --no-speak --json
```

When `--query` is omitted, the CLI records for `--seconds` and prints what it heard before answering.

## Output

Without `--json`, prints `Q:` and `A:` lines. With `--json`, prints the full `/answer` response plus `"heard"`.

## Related

* [CLI: answer](/cli/answer)
* [API: Answer](/api-references/answer)
* [Voice server: POST /ask](/api-references/voice-serve#post-ask)
* [Voice CLI overview](/cli/voice/introduction)
