The default TCP window size is too low for anything but low-latency links. This causes stuttering audio for WIS TTS where the latency between Willow and WIS is 50ms, even for very short responses. Increase the default TCP window size to 16 * MSS (1440), and adapt the receive mailbox size according to the LwIP documentation.
Similar issues could happen with WIS for STT, so let's increase the default TCP send buffer size also.
Both the TCP send buffer and receive window size were 5744 before this change.
While at it, also enable TCP SACK, which can improve overal performance by reducing unnecessary retransmissions.
The default TCP window size is too low for anything but low-latency links. This causes stuttering audio for WIS TTS where the latency between Willow and WIS is 50ms, even for very short responses. Increase the default TCP window size to 16 * MSS (1440), and adapt the receive mailbox size according to the LwIP documentation.
Similar issues could happen with WIS for STT, so let's increase the default TCP send buffer size also.
Both the TCP send buffer and receive window size were 5744 before this change.
While at it, also enable TCP SACK, which can improve overal performance by reducing unnecessary retransmissions.