The term is soliloquy: a speech delivered alone on stage, revealing private thoughts and feelings to the audience. It’s a key dramatic device for character insight.