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 while alone on stage, typically reflecting their inner feelings or thoughts. In contrast, a monologue is a longer speech by one character that may be addressed to other characters or the audience, and it can serve to advance the plot or reveal information.