Trim GA session.update + add deploy marker + surface upstream silence
The previous run showed session_started, then total silence from the relay for the entire conversation — no events forwarded, no errors, nothing. Two changes to disambiguate: 1. Drop the explicit audio.input.format / audio.output.format objects. 24 kHz PCM16 mono is the documented GA default for both directions and the only thing OpenAI ever advertised; an unrecognised value inside the format object is the most likely reason OpenAI silently ignores incoming audio. 2. Forward 'upstream silent NxN250ms' debug envelopes every ~2 s when ReceiveJsonAsync keeps returning null, and add a 'server_version' field to hello_ack so the Pi journal proves which build is running.
This commit is contained in:
@@ -128,10 +128,18 @@ public class RealtimeSession
|
||||
if (evt is null && ct.IsCancellationRequested) return;
|
||||
if (evt is null)
|
||||
{
|
||||
// Upstream has gone silent. If null persists for >2s, log so
|
||||
// we can spot a dead upstream that's not surfacing as a close.
|
||||
// Upstream has gone silent. Surface that to the device every
|
||||
// ~2s so we can tell "OpenAI is up but emitting nothing" from
|
||||
// "the upstream WS was closed" — Coolify logs aren't reachable.
|
||||
if (++nullPolls % 8 == 0)
|
||||
_logger.LogDebug("upstream silent ({Polls} x 250ms polls)", nullPolls);
|
||||
{
|
||||
_logger.LogInformation("upstream silent ({Polls} x 250ms polls)", nullPolls);
|
||||
await _output.WriteEnvelopeAsync(new JsonObject
|
||||
{
|
||||
["type"] = "debug",
|
||||
["message"] = "upstream silent " + nullPolls + "x250ms",
|
||||
}, ct);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
nullPolls = 0;
|
||||
|
||||
Reference in New Issue
Block a user