If you make a speech to yourself in your bathroom mirror, you soliloquize. To soliloquize is to talk at length to yourself.
The verb soliloquize comes from the noun soliloquy, which is a speech given by a person who has no audience — or a speech given by a character in a play who is alone on stage. When an actor soliloquizes, she tells the play's audience what she's thinking. Shakespeare's characters often soliloquize — most famously, Hamlet soliloquizes, "To be or not to be?" The word combines the Latin solus, "alone," and loqui, "speak."