Enable isolated Remote speech and protect reading exports

Attach incoming software speech to reader sessions with lease checks, local output priority and isolated cancellation. Preserve every document fragment source for privacy checks and export reviewed browse current-line reading, spelling and phonetic output.

Verified focused reading and Remote race tests, complete review and external Remote race suites, private relay integration, speech regressions, affected-package vet, reader build and Tentacles make check. Audible speech, physical input/Braille and live interoperability remain unverified.
This commit is contained in:
ak47 committed 2026-11-05 15:41:08 -05:00
1 parent ac67236eca
commit 49be8309fe
27 files changed
+986 -54

No files matched your search

+13
View File
@@ -273,6 +273,19 @@ func (client *Client) Speak(ctx context.Context, text string) (result error) {
return client.speak(ctx, text)
}
// SetBackgroundPriority makes this isolated client yield to ordinary MESSAGE
// output. Call before speaking; relay priorities must never select SSIP priority.
// TEXT waits behind MESSAGE and is cancelled when new MESSAGE output arrives.
// Protocol: https://github.com/brailcom/speechd/blob/master/doc/ssip.texi
func (client *Client) SetBackgroundPriority(ctx context.Context) error {
client.mutex.Lock()
defer client.mutex.Unlock()
if client.conn == nil {
return errors.New("speech client is not connected")
}
return client.sendCommand(ctx, []string{"SET", "SELF", "PRIORITY", "TEXT"})
}
// SpeakCharacter gives the synthesizer a single character as a character,
// preserving repeated adjacent letters during caret and flat review. Spoken
// names such as "space" still use normal speech.