feat(dictate): add voice-reactive listening waveform
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Stream bounded audio levels for the dictate indicator
|
||||
|
||||
Date: 26AUG2026
|
||||
Status: Accepted
|
||||
|
||||
## Context
|
||||
|
||||
Pi Dictate previously exposed only static service states. Active recording was easy to miss, and the extension had no signal from which to render a voice-reactive waveform. Raw microphone access must remain isolated in the host service.
|
||||
|
||||
## Decision
|
||||
|
||||
Protocol version 2 adds a `level` event while the service is listening. The recorder converts each 100 ms PCM window to a normalized logarithmic RMS level. The service sends the current scalar to the owning client at no more than 10 Hz.
|
||||
|
||||
The extension renders a fixed-width footer status:
|
||||
|
||||
```text
|
||||
● listening ▁▂▄▇█▆▃▂▅▇▄▂
|
||||
```
|
||||
|
||||
The circle uses Pi's semantic error color. Twelve block cells show recent levels as a scrolling history. Loading, stopping, and transcription remain static text.
|
||||
|
||||
## Consequences
|
||||
|
||||
- The indicator reacts to speech without granting Pi microphone access or sending PCM over the socket.
|
||||
- Output remains bounded by the existing per-connection queue and frame limits.
|
||||
- The extension and installed service must upgrade together because protocol version 1 clients do not understand level events.
|
||||
- Recording causes at most ten footer renders and protocol events per second.
|
||||
Reference in New Issue
Block a user