1
0

feat: Introduce explicit start, stop, and status commands, including minimum recording duration.

This commit is contained in:
2026-02-28 18:06:15 +01:00
parent 8ec0629e1a
commit a55e599c4f
13 changed files with 234 additions and 283 deletions

View File

@@ -19,6 +19,7 @@ Clients send small byte arrays (1 to 3 bytes) to issue commands to the server.
| **STOP** | `2` | Forces the daemon to stop recording and begin processing. Takes flags. |
| **ABORT** | `3` | Stops audio recording and discards the buffer without making API calls. |
| **TOGGLE** | `4` | Stops recording if currently recording; starts recording if inactive. Takes flags. |
| **STATUS** | `5` | Queries the daemon for its current recording status (idle or recording). Takes a JSON flag. |
## Payload Formats
@@ -27,7 +28,14 @@ Used for state changes that don't return streaming text.
```text
[ Command Byte ]
```
Example (`ABORT`): `[ 0x03 ]`
Example (`ABORT`): `[ 0x03 ]`
### 2-Byte Payloads (`STATUS`)
When asking the daemon for its status, the client specifies whether it wants a JSON response.
```text
[ Command Byte ] [ JSON Flag ]
```
Example (`STATUS` with JSON): `[ 0x05, 0x01 ]`
### 3-Byte Payloads (`STOP`, `TOGGLE`)
When asking the daemon to process audio, the client can specify how it wants to receive the result. The client sends exactly 3 bytes: