getting noise when connecting speaker out of sim800l to raspberry pi
Just saw your edit, I'm gonna write a reply anyway.

It is probably due to your power supply and/or ground loops which inject noise into your circuit.

Make sure you are using an isolated supply and that the operating frequency is out of audible range (although it's not always easy to know as the control may change frequency upon the current drawn).


Avoid the cheap power supplies, take a good one. 
Try to add a big cap 100/300uF and several small caps like 0.1uf 10nF at the power supply / input of your circuit.
Try making a LC filter by adding ferrite, inductor on the supply lines.
Make sure your circuit has all the necessary bypass cap (0.1uF) on each chip VDD pins.
Make sure you have a ground plane.
Make sure you don't have significant current going through the ground on your board, like having a module or another board connected on the "other side" of the board as the power input.


A picture of the board / pcb layout would help.