The main difference between a monologue and a soliloquy is:
In a soliloquy, the speaker assumes they cannot be heard.
A soliloquy is a speech in which a character speaks their thoughts aloud, typically alone on stage, reflecting their inner feelings, while a monologue may be given in the presence of other characters and usually serves to advance the plot or provide information.