Électret Microphone and speaker with RJ9 on esp32

Hello,

Sorry for if the question if I'm not clear, i'm not nor développer, nor electronician , but i've done a small project with esp32 to do a full duplex audio stream, well done :sweat_smile:, but now I have a problem to connect the microphone i want to use without have too noise.

I want to use a old headset of phone in what i have an électret microphone and speaker with RJ9 wire (4 connector), one pair is for speaker, that work perfectly, and the other pair, is for the electret microphone CMA-4544-PFW, in the headset i have to connect to a max9814 near to my esp32. The module work perfectly when the microphone IS directly connect on the max9818, but when it is far and connect with the RJ9 where the two pairs of wire are in the same cable i have really too much noise. I know my problem is not really an electronic or developpement promblem, but i really dont know how to correct this audio connection problem, and i hope some of you know something that could help me :grin:.
I think as the headset was already connect with the same type of microphone to a telephone like this https://www.google.com/aclk?sa=L&ai=DChcSEwjM-NCBzeH0AhUB3FEKHX_mCPIYABAJGgJ3cw&ae=2&sig=AOD64_2mSF_iZkAX1SVVQYoIa00Rwh2Wdg&ctype=5&q=&ved=2ahUKEwif_sSBzeH0AhXD7OAKHft5DF4Qwg96BAgBEBo&adurl= without noise problem even if the speaker is active, i suppose there is a method ( capacitor? Resistor ?) To make that possible...

I'm sorry that i can't share my code project nor the electronic schem, but actually, i don't know how to do :sweat_smile: as i said, it's the first Time i use a microcontroller board and first Time i devellop something other that HTML/PHP things.

I prey for tour help :sweat_smile::grin:.
Thanks, i promise toi share all that as soon as possible :sweat_smile:.

You haven't said what's connected to the speaker - that's likely the source of the noise.

You said max9818 and max9814 - I presume you mean the latter only?

Why is that? Without knowing your input circuit, how could anybody give a useful answer?

If you're using an electret mike, you probably don't need any IC's like the ones you mentioned.