diff --git a/plip_voice/main/conversation.c b/plip_voice/main/conversation.c index 23337f5..661ee36 100644 --- a/plip_voice/main/conversation.c +++ b/plip_voice/main/conversation.c @@ -311,11 +311,19 @@ static void conv_task(void *arg) vTaskDelay(pdMS_TO_TICKS(50)); } if (!s_offhook) break; - vTaskDelay(pdMS_TO_TICKS(100)); /* line settle after playback (was 200) */ + vTaskDelay(pdMS_TO_TICKS(200)); /* let the I2S DMA tail drain */ - /* Capture player utterance — nothing is playing now. */ + /* Kill the earpiece amp during capture: at full volume + 24 dB + * mic gain the playback couples into the handset mic at ~50 % + * FS and swamps the caller's voice (capture transcribed empty). + * PA off = no echo path; restored before the reply plays. */ + audio_pa_set(false); + vTaskDelay(pdMS_TO_TICKS(60)); /* PA mute settle */ + + /* Capture caller utterance — earpiece muted, nothing plays. */ int n = audio_capture_wav(cap_buf, cap_max, cap_ms, CAPTURE_SILENCE_MS); + audio_pa_set(true); /* restore for filler/reply */ if (!s_offhook) break; /* hung up during capture */ if (n <= 44) {