Documentation
¶
Overview ¶
Package noisefilter implements the bounded, pre-ASR PCM filtering contract. A failed or late filter never releases the original audio downstream.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is session-local and called serially. Sequence numbers prevent a retry, reordered request, or expired sidecar state from corrupting audio.
func (*Client) Process ¶
Process returns the same sample count. RNNoise has a 20ms streaming delay, DeepFilterNet3 40ms (42ms with FIR conversion), and real-tse advertises a 65ms bound including its FIFO and resampling. The caller must forward this result, never the original PCM, to admission. Large ingress packets are split into <=100ms processing requests, all sharing one delivery deadline so batching cannot multiply caller latency. Target jobs may finish state updates after that deadline, but their late PCM is discarded. There is no wait for a transcript or a complete utterance. Target extraction passes audio through its FIFO during initial enrollment; after activation it never falls back to raw audio or returns to enrollment.
type Config ¶
type Status ¶
type Status struct {
State string `json:"state"`
LatePackets uint64 `json:"late_packets"`
MutedMS float64 `json:"muted_ms"`
Reason string `json:"reason,omitempty"`
}
Status describes audio delivery, not acoustic target-presence confidence. Degraded is latched until a new session; it never initiates re-enrollment.